From c2f0397d5cc06852a2f518867df879cde8f85032 Mon Sep 17 00:00:00 2001 From: wing328 Date: Thu, 30 Jun 2016 15:40:35 +0800 Subject: [PATCH] minor fix to ruby test cases --- .../src/main/resources/ruby/model_test.mustache | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/ruby/model_test.mustache b/modules/swagger-codegen/src/main/resources/ruby/model_test.mustache index 9425585780f..0794015585d 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/model_test.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/model_test.mustache @@ -28,10 +28,11 @@ require 'date' 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 + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + #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