spec/bogus/mocking_dsl_spec.rb in bogus-0.0.4 vs spec/bogus/mocking_dsl_spec.rb in bogus-0.1.0
- old
+ new
@@ -267,15 +267,19 @@
greeter = fake
greeter.greet("Jake")
greeter.should have_received.greet("Jake")
+ greeter.should_not have_received.greet("Bob")
end
- it "allows chaining interactions" do
- greeter = fake(foo: "bar")
+ it "verifies mock expectations set on anonymous fakes" do
+ greeter = fake
+ mock(greeter).greet("Jake") { "Hello Jake" }
- greeter.baz.foo.should == "bar"
+ expect {
+ Bogus.after_each_test
+ }.to raise_error(Bogus::NotAllExpectationsSatisfied)
end
end
class SampleOfConfiguredFake
def self.foo(x)