diff --git a/samples/client/petstore/ruby/spec/pet_spec.rb b/samples/client/petstore/ruby/spec/pet_spec.rb index f0e38084802..67cee70c1ee 100644 --- a/samples/client/petstore/ruby/spec/pet_spec.rb +++ b/samples/client/petstore/ruby/spec/pet_spec.rb @@ -15,17 +15,17 @@ describe "Pet" do end it "should find pets by status" do - pets = PetApi.find_pets_by_status('available') + pets = PetApi.find_pets_by_status(:status => 'available') pets.length.should >= 3 end it "should not find a pet with invalid status" do - pets = PetApi.find_pets_by_status('invalid-status') + pets = PetApi.find_pets_by_status(:status => 'invalid-status') pets.length.should == 0 end it "should find a pet by status" do - pets = PetApi.find_pets_by_status("available,sold") + pets = PetApi.find_pets_by_status(:status => "available,sold") pets.map {|pet| if(pet.status != 'available' && pet.status != 'sold') raise "pet status wasn't right" @@ -35,7 +35,7 @@ describe "Pet" do it "should update a pet" do pet = Pet.new({'id' => 10002, 'status' => 'sold'}) - PetApi.add_pet(pet) + PetApi.add_pet(:body => pet) fetched = PetApi.get_pet_by_id(10002) fetched.id.should == 10002 @@ -44,7 +44,7 @@ describe "Pet" do it "should create a pet" do pet = Pet.new('id' => 10002, 'name' => "RUBY UNIT TESTING") - PetApi.add_pet(pet) + PetApi.add_pet(:body => pet) pet = PetApi.get_pet_by_id(10002) pet.id.should == 10002 diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index c4c56d8a955..71725a45a6c 100644 --- a/samples/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/client/petstore/ruby/spec/spec_helper.rb @@ -47,10 +47,10 @@ end # always delete and then re-create the pet object with 10002 def prepare_pet # remove the pet - PetApi.delete_pet('special-key', 10002) + PetApi.delete_pet(10002) # recreate the pet pet = Pet.new('id' => 10002, 'name' => "RUBY UNIT TESTING") - PetApi.add_pet(pet) + PetApi.add_pet(:body => pet) end # always delete and then re-create the store order @@ -61,7 +61,7 @@ def prepare_store "shipDate" => "2015-04-06T23:42:01.678Z", "status" => "placed", "complete" => false) - StoreApi.place_order(order) + StoreApi.place_order(:body => order) end configure_swagger