[rspec-users] Unable to stub a class method in a before_filter

Scott Taylor mailing_lists at railsnewbie.com
Tue Nov 4 15:55:18 EST 2008

On Nov 4, 2008, at 3:46 PM, Fernando Perez wrote:

> Are the docs on mock outdated? I sometimes see mock_model, and  
> sometimes
> mock. Which one should be used?

mock_model is for ActiveRecord objects.  it's just a mock() call with  
a random id stub set, and a :new_record? => false


More information about the rspec-users mailing list