Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Don't parse current_host when building mock session #899

Merged
merged 1 commit into from

2 participants

@bcardarella

Because the current_host is now being explicitly set to the host instead
of the full URI (as it was in Capybara 1.x) when URI.parse is being used
the result will always be nil when parsing the host from an incomplete
URI.

@bcardarella bcardarella Don't parse current_host
Because the current_host is now being explicitly set to the host instead
of the full URI (as it was in Capybara 1.x) when URI.parse is being used
the result will always be `nil` when parsing the host from an incomplete
URI.
278f4e7
@bcardarella

This is a bug that is causing issues as the default_host for the mock session object is nil and thus the default_host for the CookieJar is also set to nil.

@jnicklas jnicklas merged commit 7137de8 into jnicklas:master
@bcardarella

Woot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 3, 2012
  1. @bcardarella

    Don't parse current_host

    bcardarella authored
    Because the current_host is now being explicitly set to the host instead
    of the full URI (as it was in Capybara 1.x) when URI.parse is being used
    the result will always be `nil` when parsing the host from an incomplete
    URI.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/capybara/rack_test/browser.rb
View
2  lib/capybara/rack_test/browser.rb
@@ -94,7 +94,7 @@ def html
def build_rack_mock_session
reset_host! unless current_host
- Rack::MockSession.new(app, URI.parse(current_host).host)
+ Rack::MockSession.new(app, current_host)
end
def request_path
Something went wrong with that request. Please try again.