I'm integrating capybara to a project. At first instance, I just wanted to check what is displaying the login page, so I made this code:
require 'acceptance/acceptance_helper'
feature 'Login' do
scenario 'sign in with right credentials' do
visit '/'
save_and_open_page
end
end
But when I run the test, it shows me:
Failure/Error: visit '/'
ActionController::RoutingError:
No route matches "/login"
# ./spec/acceptance/login_spec.rb:6
If I enter to the application without a valid session, it redirects me (code 302) to a rubycas server to log me in (which has the /login context at start) and after that it redirects me again to my server. What should I do to just view the login page or how to maintain the redirection references in capybara?