spec/mongoid/relations/bindings/referenced/one_spec.rb in mongoid-3.1.7 vs spec/mongoid/relations/bindings/referenced/one_spec.rb in mongoid-4.0.0.alpha1
- old
+ new
@@ -27,15 +27,15 @@
game.should_receive(:save).never
binding.bind_one
end
it "sets the inverse relation" do
- game.person.should eq(person)
+ expect(game.person).to eq(person)
end
it "sets the foreign key" do
- game.person_id.should eq(person.id)
+ expect(game.person_id).to eq(person.id)
end
end
context "when the document is not bindable" do
@@ -64,15 +64,15 @@
game.should_receive(:delete).never
binding.unbind_one
end
it "removes the inverse relation" do
- game.person.should be_nil
+ expect(game.person).to be_nil
end
it "removed the foreign key" do
- game.person_id.should be_nil
+ expect(game.person_id).to be_nil
end
end
context "when the document is not unbindable" do
@@ -98,11 +98,11 @@
before do
person.game = game
end
it "does not set the foreign key" do
- game.person_id.should be_nil
+ expect(game.person_id).to be_nil
end
end
end
context "when unbinding frozen documents" do
@@ -122,10 +122,10 @@
game.freeze
person.game = nil
end
it "does not unset the foreign key" do
- game.person_id.should eq(person.id)
+ expect(game.person_id).to eq(person.id)
end
end
end
end