search for: another_arg

Displaying 1 result from an estimated 1 matches for "another_arg".

Did you mean: another_app
2006 Oct 11
0
stubbing/mocking
...mock = mock("stubbing mock") mock.stub!(:msg).and_return(:stub_value) mock.should_receive(:msg).with(:arg).and_return(:mock_value) mock.msg.should_equal :stub_value mock.msg(:other_arg).should_equal :stub_value mock.msg(:arg).should_equal :mock_value mock.msg(:another_arg).should_equal :stub_value mock.msg(:yet_another_arg).should_equal :stub_value mock.msg.should_equal :stub_value end end Basically, the stub will be invoked for any calls to :msg without :arg. Does this seem useful? Check out the trunk if you think so and give it a shot. Thanks, David