search for: mock_valu

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

Did you mean: mock_value
2006 Oct 11
0
stubbing/mocking
...ubs 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 :stub_value mock.msg.should_equal :stub_value end end Basicall...