[rspec-users] Getting past my login system
rctucker at u.washington.edu
Tue Jul 17 14:32:38 EDT 2007
Scott Taylor wrote:
>> My apologies if this has been redundant. I did try reading through
>> posts before posting my own, but I guess I did not understand how to
>> apply what I read to what I have. I did attempt mocking a user
>> using the
>> method suggested by Scott, but got an error stating:
>> "Mock 'User_1000' received unexpected message :preferences wit (no
> I'm glad you finally solved the problem (with the help of Daniel N).
> I didn't mean to be condescending on the matter of reading the
> mailing list. Authentication is a hard matter to deal with because
> of Rails complications.
> As for mocks - you might want to google Martin Fowlers article about
> how "Mocks aren't stubs". Every mock that receives an unexpected
> message (i.e. method call) will raise a MockExpectationError. This
> is a sign that you should probably be stubbing those methods.
> Scott Taylor
> rspec-users mailing list
> rspec-users at rubyforge.org
No offense was taken. It turned out it was just my lack of
understanding of the mocks and stubs that was getting in the way of all
of this. It is all very clear now. Thank you very much, to the both of
you, this has been a huge help.
More information about the rspec-users