I'm trying to stub an authentication filter in my controller specs with the 
following "before" block. 

  before(:all) do
    controller.stub(:signed_in?).and_return(true)
  end

Unfortunately, I'm getting: 

Failure/Error: controller.stub(:signed_in?).and_return(true)
NoMethodError: undefined method `stub' for nil:NilClass

Does anyone know how to resolve this error? I'm using rails 3.2.6 with 
rspec-rails 2.10.1

Thanks.

-Ari

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rspec/-/Z4n5Vt_KQ0MJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to