mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
show attempted url when setting invalid app_host or default_host
This commit is contained in:
parent
dfaf958ea7
commit
39e9b2f7fb
1 changed files with 2 additions and 2 deletions
|
@ -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)" unless url.nil? || (url =~ URI::DEFAULT_PARSER.make_regexp)
|
||||
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)
|
||||
@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)" unless url.nil? || (url =~ URI::DEFAULT_PARSER.make_regexp)
|
||||
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)
|
||||
@default_host = url
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue