spec/functional/modifiers_spec.rb in mongo_mapper-0.13.1 vs spec/functional/modifiers_spec.rb in mongo_mapper-0.14.0.rc1
- old
+ new
@@ -67,11 +67,11 @@
end
it "should be able to pass safe option" do
page_class.create(:title => "Better Be Safe than Sorry")
- Mongo::Collection.any_instance.should_receive(:update).with(
+ expect_any_instance_of(Mongo::Collection).to receive(:update).with(
{:title => "Better Be Safe than Sorry"},
{'$unset' => {:tags => 1}},
{:w => 1, :multi => true}
)
page_class.unset({:title => "Better Be Safe than Sorry"}, :tags, {:w => 1})
@@ -194,10 +194,10 @@
end
it "should be able to pass safe option" do
page_class.create(:title => "Better Be Safe than Sorry")
- Mongo::Collection.any_instance.should_receive(:update).with(
+ expect_any_instance_of(Mongo::Collection).to receive(:update).with(
{:title => "Better Be Safe than Sorry"},
{'$set' => {:title => "I like safety."}},
{:w => 1, :multi => true}
)
page_class.set({:title => "Better Be Safe than Sorry"}, {:title => "I like safety."}, {:safe => true})
\ No newline at end of file