Re: [rspec-users] Stumped with nil Class error

2011-01-09 Thread Ants Pants
Thanks for the reply but I've sorted it. I implemented this http://iain.nl/2008/11/authlogic-is-awesome/ I think the instance variables in this example replicate how they will look in the actual controller (thus enabling me to stub them/set message exp

Re: [rspec-users] Stumped with nil Class error

2011-01-07 Thread Mike Mazur
Hi, On Sat, Jan 8, 2011 at 01:58, Ants Pants wrote: > I thought that the controller.stub(:require_member).and_return(member) would > suffice for the require_member stuff but I'm obviously wrong. I've even > replaced the member for @member in my spec but to no avail. > Here's the describe example

[rspec-users] Stumped with nil Class error

2011-01-07 Thread Ants Pants
I'm really, really confused about the use of instance variables in my controller and their relationship to my controller spec. I'm trying to spec a controller that has a before_filter :require_member (it's Authlogic and set up in ApplicationController. It in turn calls current_member - which retu