It's my understanding that Rails' testing environment is torn down and rebuilt before each test...so how do I test a controller that requires that a user be logged in and that user can't be created without Device's confirmable module getting in the way?
Devise's recommended method (below) creates a new user which is then sent an email by Devise's confirmable
module. How do I get around this so I'm not 'creating' a user each time...or if I am I can get an object to test w/out "simulating" a new email for each spec?
before(:each) do
@user = Factory.create(:user)
sign_in @user
end
I'm sure I'm overlooking something painfully obvious as this must be a very common spec for anyone using Devise with confirmable...
before(:all)
block, to speed it up... – Abidjan