1 # stub frameworks like to gum up Object, so this is deliberately
2 # set NOT to run so that you don't accidentally run it when you
5 # To run it, stand in this directory and say:
7 # RUN_FLEXMOCK_EXAMPLE=true ruby ../bin/spec mocking_with_flexmock.rb
9 if ENV['RUN_FLEXMOCK_EXAMPLE']
10 Spec::Runner.configure do |config|
11 config.mock_with :flexmock
14 describe "Flexmocks" do
15 it "should fail when the expected message is received with wrong arguments" do
16 m = flexmock("now flex!")
17 m.should_receive(:msg).with("arg").once
21 it "should fail when the expected message is not received at all" do
22 m = flexmock("now flex!")
23 m.should_receive(:msg).with("arg").once