Skip to content

Commit 83d64b7

Browse files
authored
[Ruby] fix ruby test, update error message (#4041)
* fix ruby test, update error message * use block * update template for api client spec * update test files
1 parent 60567bd commit 83d64b7

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

modules/openapi-generator/src/main/resources/ruby-client/api_client_spec.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ describe {{moduleName}}::ApiClient do
150150
end
151151

152152
it 'fails for invalid collection format' do
153-
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
153+
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
154154
end
155155
end
156156

samples/client/petstore/ruby/spec/api_client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
end
157157

158158
it 'fails for invalid collection format' do
159-
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
159+
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
160160
end
161161
end
162162

samples/openapi3/client/petstore/ruby-faraday/spec/api_client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
end
119119

120120
it 'fails for invalid collection format' do
121-
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
121+
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
122122
end
123123
end
124124

samples/openapi3/client/petstore/ruby/spec/api_client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
end
157157

158158
it 'fails for invalid collection format' do
159-
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
159+
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
160160
end
161161
end
162162

0 commit comments

Comments
 (0)