[rspec-users] mock_model with Rspec/Rspec-rails 1.2 and Rails 2.3

Pat Maddox pat.maddox at gmail.com
Wed Mar 18 12:54:10 EDT 2009


On Mar 17, 2009, at 11:37 PM, David Chelimsky wrote:

> 2009/3/18 Tom Meier <tom at zudio.com.au>:
>>
>> With the above settings when our specs run (while on rails 2.3 and  
>> rspec
>> 1.2), the following error occurs :
>> undefined method `mock_model=' for #<User:0x2d5887c>
>
> The error says "mock_model=", which indicates that you're trying to
> set it somewhere in your code. Please show us the spec that is failing
> with a reference to the line that is raising that error.

I think this would require him to do
self.mock_model = blah
or
send("mock_model=", blah)

which seems really, really weird.  Oh well.  Some code ought to clear  
it up.

Pat



More information about the rspec-users mailing list