forked from loafle/openapi-generator-original
Merge pull request #3258 from wing328/ruby_fix_test_case
[Ruby] minor update to ruby test cases
This commit is contained in:
commit
45f13b28a0
@ -28,10 +28,11 @@ require 'date'
|
|||||||
describe 'test attribute "{{{name}}}"' do
|
describe 'test attribute "{{{name}}}"' do
|
||||||
it 'should work' do
|
it 'should work' do
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
validator = Petstore::EnumTest::EnumAttributeValidator.new('{{{datatype}}}', [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}])
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||||
validator.allowable_values.each do |value|
|
#validator = Petstore::EnumTest::EnumAttributeValidator.new('{{{datatype}}}', [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}])
|
||||||
expect { @instance.{{name}} = value }.not_to raise_error
|
#validator.allowable_values.each do |value|
|
||||||
end
|
# expect { @instance.{{name}} = value }.not_to raise_error
|
||||||
|
#end
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{^isEnum}}
|
{{^isEnum}}
|
||||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user