search for: mock_method

Displaying 3 results from an estimated 3 matches for "mock_method".

Did you mean: lock_method
2007 Jan 02
4
allow stubbing of previously defined methods such as "id"
On my current project I needed to create a stub that responded correctly to the id message. Here''s the change I put into my copy of head. Index: lib/mocha/mock_methods.rb =================================================================== --- lib/mocha/mock_methods.rb (revision 1114) +++ lib/mocha/mock_methods.rb (working copy) @@ -68,6 +68,7 @@ method_names = method_names.is_a?(Hash) ? method_names : { method_names => nil } method_names.e...
2006 Dec 14
1
Patch: make rdoc of lib/mocha/object.rb instead of lib/stubba/object.rb
...ne-numbers" << "--inline-source" - task.rdoc_files.include(''README'', ''RELEASE'', ''COPYING'', ''MIT-LICENSE'', ''agiledox.txt'', ''lib/mocha/auto_verify.rb'', ''lib/mocha/mock_methods.rb'', ''lib/mocha/expectation.rb'', ''lib/stubba/object.rb'') + task.rdoc_files.include(''README'', ''RELEASE'', ''COPYING'', ''MIT-LICENSE'', ''agiledox.txt'', ''lib/mo...
2017 Jan 04
5
RFC: Reconsidering adding gmock to LLVM's unittest utilities
...ard or impossible to control from a command line in sufficient granularity and precision. While doing this is never fun and should be avoided where possible, when we need to do this I think it provides a powerful tool for the job. Here is how it works at the highest level: 1) Create a class with a MOCK_METHOD*(...) API. This API is then hookable by gmock. 2) Use some APIs to register default behaviors for the APIs. 3) Setup the *minimal* amount of expected API interactions for a given test. IE, for this test to pass, X has to happen and in response to that my code needs to do Y. 4) Feed this class, or a...