From a0e9d78d8f41b90ee3eed76e047082ac3ccfd32b Mon Sep 17 00:00:00 2001 From: Jonas Nicklas Date: Fri, 26 Feb 2010 18:39:23 +0100 Subject: [PATCH] Yo dawg, I put a revert in ur revert Readding support for specifying host for mock rack session This reverts commit 62bd215a476d84da5311a32ecb00fee0d9a8c3e7. --- lib/capybara.rb | 2 +- lib/capybara/driver/rack_test_driver.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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