[rspec-devel] [ rspec-Bugs-11774 ] Mocks should respond to :kind_of? in the same way they respond to :is_a?

noreply at rubyforge.org noreply at rubyforge.org
Fri Jun 22 17:44:05 EDT 2007


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

>Category: rails plugin
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Ben Tucker (btucker)
>Assigned to: David Chelimsky (dchelimsky)
Summary: Mocks should respond to :kind_of? in the same way they respond to :is_a?

Initial Comment:
Mocks currently respond to :is_a? by matching the class the mock object is mocking. :kind_of? should behave the same. 

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-06-22 21:43

Message:
Fixed in r2105

Added support for instance_of? too.

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

Comment By: Ben Tucker (btucker)
Date: 2007-06-22 16:30

Message:
Yes, sorry, I miscategorized this.  I am referring to
mock_model in Spec::Rails.

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-06-22 16:19

Message:
Core mocks don't do this at all. Are you referring to mock_model in Spec::Rails?

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

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


More information about the rspec-devel mailing list