-
-
Notifications
You must be signed in to change notification settings - Fork 117
Testing
RaulKite edited this page Feb 6, 2013
·
2 revisions
In your test_helper.rb
class ActionController::TestCase
include Devise::TestHelpers
end
class ActionDispatch::IntegrationTest
include Warden::Test::Helpers
Warden.test_mode!
end
Be sure to call Warden.test_reset!
at the end of your tests!
In features/support/env.rb
#Warden Helpers
include Warden::Test::Helpers
Warden.test_mode!
After do
Warden.test_reset!
end
In my steps
@pepito = FactoryGirl.create(:user)
login_as(@pepito, :scope => "user")