spec/mongoid/relations/bindings/referenced/one_spec.rb in mongoid-4.0.0.alpha1 vs spec/mongoid/relations/bindings/referenced/one_spec.rb in mongoid-4.0.0.alpha2
- old
+ new
@@ -21,12 +21,12 @@
end
context "when the document is bindable" do
before do
- person.should_receive(:save).never
- game.should_receive(:save).never
+ expect(person).to receive(:save).never
+ expect(game).to receive(:save).never
binding.bind_one
end
it "sets the inverse relation" do
expect(game.person).to eq(person)
@@ -42,11 +42,11 @@
before do
game.person = person
end
it "does nothing" do
- person.should_receive(:game=).never
+ expect(person).to receive(:game=).never
binding.bind_one
end
end
end
@@ -58,12 +58,12 @@
context "when the document is unbindable" do
before do
binding.bind_one
- person.should_receive(:delete).never
- game.should_receive(:delete).never
+ expect(person).to receive(:delete).never
+ expect(game).to receive(:delete).never
binding.unbind_one
end
it "removes the inverse relation" do
expect(game.person).to be_nil
@@ -75,10 +75,10 @@
end
context "when the document is not unbindable" do
it "does nothing" do
- person.should_receive(:game=).never
+ expect(person).to receive(:game=).never
binding.unbind_one
end
end
end