diff --git a/lib/capybara/selenium/driver.rb b/lib/capybara/selenium/driver.rb index acad781c..a3219921 100644 --- a/lib/capybara/selenium/driver.rb +++ b/lib/capybara/selenium/driver.rb @@ -275,7 +275,7 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base browser_name == "chrome" end - private +private def browser_name options[:browser].to_s diff --git a/lib/capybara/session/config.rb b/lib/capybara/session/config.rb index 16dd31be..6f28c206 100644 --- a/lib/capybara/session/config.rb +++ b/lib/capybara/session/config.rb @@ -68,13 +68,13 @@ module Capybara remove_method :app_host= def app_host=(url) - raise ArgumentError, "Capybara.app_host should be set to a url (http://www.example.com). Tried to set to #{url.inspect}." unless url.nil? || (url =~ URI::DEFAULT_PARSER.make_regexp) + raise ArgumentError, "Capybara.app_host should be set to a url (http://www.example.com). Attempted to set #{url.inspect}." if url && url !~ URI::DEFAULT_PARSER.make_regexp @app_host = url end remove_method :default_host= def default_host=(url) - raise ArgumentError, "Capybara.default_host should be set to a url (http://www.example.com). Tried to set to #{url.inspect}." unless url.nil? || (url =~ URI::DEFAULT_PARSER.make_regexp) + raise ArgumentError, "Capybara.default_host should be set to a url (http://www.example.com). Attempted to set #{url.inspect}." if url && url !~ URI::DEFAULT_PARSER.make_regexp @default_host = url end