Hi,

Thanks for the assistance, I overlooked the obvious with the '=' in the error... After reviewing the error i started a new project and tried to replicate to show you the steps, but everything works as it should (sorry - i should have completed that already before contacting you). After narrowing it down with Pats' suggestion, it turns out it was referring back to itself, I was using a blueprint with the plugin 'Machinist', and a method was of the same name as a field name ('login') so it was pointing back to itself trying to make a mock of a mock...

So thanks for your assistance, much appreciated... Just overlooked something...


Best regards,

Tom



Thomas Meier
Lead Developer
Zudio Pty. Ltd.
Level 1 / 151 Park Road, Cheltenham,
Victoria 3192
Phone +61 3 9585 2077 Fax +61 3 9585 2079
zudio.com.au
Design | Web | Video | Music


From: Pat Maddox <pat.mad...@gmail.com>
Date: 19 March 2009 3:54:10 AM
To: rspec-users <rspec-users@rubyforge.org>
Subject: Re: [rspec-users] mock_model with Rspec/Rspec-rails 1.2 and Rails 2.3
Reply-To: rspec-users <rspec-users@rubyforge.org>


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

2009/3/18 Tom Meier <t...@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


From: Pat Maddox <pat.mad...@gmail.com>


_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to