forked from loafle/openapi-generator-original
regenerate ruby spec file
This commit is contained in:
@@ -27,7 +27,15 @@ require 'date'
|
||||
{{#vars}}
|
||||
describe 'test attribute "{{{name}}}"' do
|
||||
it 'should work' do
|
||||
{{#isEnum}}
|
||||
validator = Petstore::EnumTest::EnumAttributeValidator.new('{{{datatype}}}', [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}])
|
||||
validator.allowable_values.each do |value|
|
||||
expect { @instance.{{name}} = value }.not_to raise_error
|
||||
end
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
{{/isEnum}}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user