spec/support/shared_examples/ridley_resource.rb in ridley-0.0.2 vs spec/support/shared_examples/ridley_resource.rb in ridley-0.0.3
- old
+ new
@@ -206,16 +206,16 @@
end
end
describe "#to_json" do
it "serializes the objects attributes using MultiJson" do
- MultiJson.should_receive(:dump).with(subject.attributes, kind_of(Hash))
+ MultiJson.should_receive(:encode).with(subject.attributes, kind_of(Hash))
subject.to_json
end
it "returns the seralized value" do
- MultiJson.stub(:dump).and_return("{}")
+ MultiJson.stub(:encode).and_return("{}")
subject.to_json.should eql("{}")
end
end