Hello Jason,
I think need to change some code. You need to test sections of your app
independently, so if you want to check if the view is only available for
Admins, you can login it with test methods provided by Devise and
later, visit the admins_path.
Instead of call login_admin, you can use:
login_as(user, :scope => :user)
visit admin_path
# asserts...
In another test, check if an admin can login with the form (like
login_admin). You need to set Warden to test mode including this line at
top of your integration tests:
include Warden::Test::Helpers
Warden.test_mode!
More info at:
https://github.com/plataformatec/devise/wiki/How-To:-Test-with-Capybara
Regards!
--
Posted via
http://www.ruby-forum.com/.