After further investigation I think my issue might be with routes and
SSL. The Rails app is using the 'ssl_requirement' plugin. Watching the
log/test.log file more closely I see:
Processing ApplicationController#redirect_to_root_url (for 127.0.0.1
at 2011-02-23 12:42:33) [GET]
Parameters: {"url"=>["account", "session"],
"action"=>"redirect_to_root_url", "controller"=>"application"}
Redirected to
http://www.example.com/account/session
Filter chain halted as [:ensure_proper_protocol]
rendered_or_redirected.
Completed in 1ms (DB: 0) | 302 Found [
https://www.example.com/account/
session]
routes.rb includes:
map.namespace :account, :requirements => {:protocol =>
ROUTES_PROTOCOL} do |a|
a.resource :session, :controller => 'sessions', :only => :create
a.resource :profile, :controller => 'profiles', :only => :show
end
rake routes shows:
account_session POST /account/session(.:format)
{:action=>"create", :protocol=>"https", :controller=>"account/
sessions"}
Anyone have suggestions how I can ensure my Capybara::Session is using
SSL?