diff --git a/lib/capybara.rb b/lib/capybara.rb index 3ca07809..5cddde47 100644 --- a/lib/capybara.rb +++ b/lib/capybara.rb @@ -15,7 +15,7 @@ module Capybara class InfiniteRedirectError < TimeoutError; end class << self - attr_accessor :debug, :asset_root, :app_host, :run_server + attr_accessor :debug, :asset_root, :app_host, :run_server, :default_host attr_accessor :default_selector, :default_wait_time, :ignore_hidden_elements def default_selector diff --git a/lib/capybara/driver/rack_test_driver.rb b/lib/capybara/driver/rack_test_driver.rb index dc0c2c1a..f11fe83d 100644 --- a/lib/capybara/driver/rack_test_driver.rb +++ b/lib/capybara/driver/rack_test_driver.rb @@ -216,6 +216,10 @@ class Capybara::Driver::RackTest < Capybara::Driver::Base private + def build_rack_mock_session # :nodoc: + Rack::MockSession.new(app, Capybara.default_host) + end + def current_path request.path rescue "" end