Curtis j Schofield
curtis.schofield at gmail.com
Mon Jun 28 16:03:18 EDT 2010
Any suggestions for how to detect that the methods are getting
executed that need to get executed?
On Mon, Jun 28, 2010 at 11:50 AM, David Chelimsky <dchelimsky at gmail.com> wrote:
> On Jun 28, 2010, at 1:31 PM, Curtis j Schofield wrote:
>> Hi - I extracted some methods in a refactor and put them into a nice
>> module and i'm in the process of making sure it is covered as a
>> first-class unit.
>> I'm getting some strange behavior with what seems really straight forward code.
> should_receive replaces the method in question, so when you say:
> the actual toad_string method is never invoked, hence control is not passed on to toad_nokogiri_xml_document.
> In general, mocking and stubbing methods on the object your testing should be avoided, for exactly this reason.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users