[rspec-devel] [ rspec-Bugs-11615 ] Partial mock methods give ambiguous failures when given a method name as a String

noreply at rubyforge.org noreply at rubyforge.org
Sat Jun 16 17:42:45 EDT 2007


Bugs item #11615, was opened at 2007-06-16 12:32
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11615&group_id=797

Category: mock module
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Jay Phillips (jicksta)
>Assigned to: David Chelimsky (dchelimsky)
Summary: Partial mock methods give ambiguous failures when given a method name as a String

Initial Comment:
Included is a patch to a bug I was experiencing when mocking out methods. Since Ruby allows either Strings or Symbols to be passed to methods such as send() or respond_to?(), I assumed a String could be given to obj.should_receive() and obj.should_not_receive().

Doing this resulted in a good 30 minutes loss of my time because of an ambiguous error message. It seemed to make the method simply unavailable to the other objects calling the mock but not being picked up by the proxy as called.

No harm done! Hope this helps. :)

Jay Phillips
Adhearsion Project Manager
http://jicksta.com

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-06-16 21:42

Message:
Applied to r2099

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11615&group_id=797


More information about the rspec-devel mailing list