Displaying 1 result from an estimated 1 matches for "auto_verify_test".
2007 Jan 02
4
allow stubbing of previously defined methods such as "id"
...s.each do |method_name, return_value|
expectations << Stub.new(self, method_name,
backtrace).returns(return_value)
+ self.metaclass.send :undef_method, method_name if
self.metaclass.method_defined? method_name
end
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_shou...