spec/cases/api_base_spec.rb in koala-1.1.0rc2 vs spec/cases/api_base_spec.rb in koala-1.1.0rc3

- old
+ new

@@ -50,11 +50,11 @@ it "should return the body of the request as JSON if no http_component is given" do response = stub('response', :body => 'body', :status => 200) Koala.stub(:make_request).and_return(response) json_body = mock('JSON body') - JSON.stub(:parse).and_return([json_body]) + MultiJson.stub(:decode).and_return([json_body]) @service.api('anything').should == json_body end it "should execute an error checking block if provided" do @@ -64,10 +64,10 @@ yield_test = mock('Yield Tester') yield_test.should_receive(:pass) @service.api('anything', {}, "get") do |arg| yield_test.pass - arg.should == JSON.parse(body) + arg.should == MultiJson.decode(body) end end it "should raise an API error if the HTTP response code is greater than or equal to 500" do Koala.stub(:make_request).and_return(Koala::Response.new(500, 'response body', {})) \ No newline at end of file