From 8bf84aabe5b3f249390c4db03686b372dd4b4c34 Mon Sep 17 00:00:00 2001 From: xhh Date: Wed, 20 May 2015 21:13:20 +0800 Subject: [PATCH] Add test case for nil return value --- samples/client/petstore/ruby/spec/pet_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/client/petstore/ruby/spec/pet_spec.rb b/samples/client/petstore/ruby/spec/pet_spec.rb index f66f33cf84c..68858c7b6cd 100644 --- a/samples/client/petstore/ruby/spec/pet_spec.rb +++ b/samples/client/petstore/ruby/spec/pet_spec.rb @@ -75,7 +75,9 @@ describe "Pet" do it "should create a pet" do pet = SwaggerClient::Pet.new('id' => 10002, 'name' => "RUBY UNIT TESTING") - SwaggerClient::PetApi.add_pet(:body => pet) + result = SwaggerClient::PetApi.add_pet(:body => pet) + # nothing is returned + result.should be_nil pet = SwaggerClient::PetApi.get_pet_by_id(10002) pet.id.should == 10002