Skip to content

Commit

Permalink
[Ruby] fix ruby test, update error message (#4041)
Browse files Browse the repository at this point in the history
* fix ruby test, update error message

* use block

* update template for api client spec

* update test files
  • Loading branch information
wing328 authored Oct 3, 2019
1 parent 60567bd commit 83d64b7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ describe {{moduleName}}::ApiClient do
end

it 'fails for invalid collection format' do
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
end
end

Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/spec/api_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
end

it 'fails for invalid collection format' do
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
end

it 'fails for invalid collection format' do
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
end

it 'fails for invalid collection format' do
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
end
end

Expand Down

0 comments on commit 83d64b7

Please sign in to comment.