[rspec-users] Spec'ing ApplicationController
dchelimsky at gmail.com
Mon Aug 27 23:33:45 EDT 2007
On 8/14/07, sbellware <sbellware at hotmail.com> wrote:
> I'd like to spec the behaviors that I'm adding to ApplicationController.
> Specifically, I'm adding:
> def authenticated?
> session[:username] != nil
> I described ApplicationController, but couldn't figure out how to call the
> authenticated method. I'm probably going about this quite wrongly and would
> appreciate any hints?
The way I handle this is with a shared behaviour that includes specs
for behaviours inherited from ApplicationController, but I run them
against the real controllers.
> View this message in context: http://www.nabble.com/Spec%27ing-ApplicationController-tf4270301.html#a12154175
> Sent from the rspec-users mailing list archive at Nabble.com.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users