search for: named_stub

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

2007 Jan 02
4
allow stubbing of previously defined methods such as "id"
...expectations.last end Index: test/mocha/auto_verify_test.rb =================================================================== --- test/mocha/auto_verify_test.rb (revision 1114) +++ test/mocha/auto_verify_test.rb (working copy) @@ -155,6 +155,11 @@ assert_equal ''named_stub'', stub.__mock_name end + def test_stub_should_respond_to_already_defined_method + stub = test_case.stub(:id=>"id") + assert_equal "id", stub.id + end + def test_should_create_greedy_stub_with_name greedy_stub = test_case.stub_everything(''...