[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
This commit is contained in:
William Cheng
2019-10-04 01:42:28 +08:00
committed by GitHub
parent 60567bddd6
commit 83d64b7e38
4 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -156,7 +156,7 @@ describe Petstore::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

View File

@@ -118,7 +118,7 @@ describe Petstore::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

View File

@@ -156,7 +156,7 @@ describe Petstore::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