features/fakes/anonymous_doubles.feature in bogus-0.1.4 vs features/fakes/anonymous_doubles.feature in bogus-0.1.5
- old
+ new
@@ -45,11 +45,11 @@
it "allows stubbing any method with any parameters" do
stub(library).register_junior(any_args) { "the card" }
jake.sign_up(library)
- jake.library_card.should == "the card"
+ expect(jake.library_card).to eq("the card")
end
end
"""
Scenario: Stubbing methods in initializer
@@ -62,11 +62,11 @@
let(:jake) { Student.new("Jake") }
it "allows stubbing any method with any parameters" do
jake.sign_up(library)
- jake.library_card.should == "the card"
+ expect(jake.library_card).to eq("the card")
end
end
"""
Scenario: Stubbing methods inline by passing a block
@@ -90,11 +90,11 @@
it "allows mocking any method with any parameters" do
mock(library).register_junior("Jake") { "the card" }
jake.sign_up(library)
- jake.library_card.should == "the card"
+ expect(jake.library_card).to eq("the card")
end
end
"""
Scenario: Mocking any method with any parameters
@@ -120,11 +120,11 @@
let(:jake) { Student.new("Jake") }
it "allows stubbing any method with any parameters" do
jake.sign_up(library)
- jake.library_card.should == "the card"
+ expect(jake.library_card).to eq("the card")
end
end
"""
Scenario: Spying on method calls
@@ -137,10 +137,10 @@
let(:jake) { Student.new("Jake") }
it "allows spying on any method" do
jake.sign_up(library)
- library.should have_received.register_junior("Jake")
+ expect(library).to have_received.register_junior("Jake")
end
end
"""
Scenario: Invoking arbitrary methods