[rspec-devel] [ rspec-Bugs-12547 ] validates_each issue in rails with mocking and stubbing

noreply at rubyforge.org noreply at rubyforge.org
Tue Jul 24 11:23:34 EDT 2007


Bugs item #12547, was opened at 2007-07-25 01:17
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=12547&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Daniel Neighman (hassox)
Assigned to: Nobody (None)
Summary: validates_each issue in rails with mocking and stubbing

Initial Comment:
I've been trying some code that checks for a validates_each call in an AR model.

The spec:
http://pastie.caboo.se/81744

This produces the following error:

does not detect that two responses are equal

Mock 'Book_1027' expected :store_with_privacy? with (#<Clip:0x1a9139c @name="Clip_1025">) but received it with (#<Clip:0x1a9139c @name="Clip_1025">)

and

stub overwrites mock

Mock 'Book_1026' expected :store_with_privacy? with (#<Clip:0x1a91b1c @name="Clip_1025">) once, but received it 0 times

The Model is:
http://pastie.caboo.se/81745


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

>Comment By: Daniel Neighman (hassox)
Date: 2007-07-25 01:23

Message:
A bit more information

I have rspec installed as plugins in rails

rspec 2174
rspec_on_rails 2174

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

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


More information about the rspec-devel mailing list