Displaying 1 result from an estimated 1 matches for "stub_valu".
Did you mean:
stub_value
2006 Oct 11
0
stubbing/mocking
...y a conversation on the mocha list, I added the ability to
mix stubs w/ mocks on the same methods.
Here''s what it allows:
context "a mock" do
specify "can stub! and mock the same message" do
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 :stu...