Skip to content

Commit

Permalink
don't use request.domain as it's not always available
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicklas committed Apr 2, 2011
1 parent 218510e commit 3e5d923
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/capybara/spec/session/current_host_spec.rb
Expand Up @@ -13,7 +13,7 @@
it "returns to the app host when visiting a relative url" do
Capybara.app_host = "http://capybara1.elabs.se"
@session.visit('http://capybara-testapp.heroku.com/host')
@session.body.should include('Current host is capybara-testapp.heroku.com')
@session.body.should include('Current host is http://capybara-testapp.heroku.com')
@session.current_host.should == 'http://capybara-testapp.heroku.com'
@session.visit('/host')
@session.body.should include('Current host is http://capybara1.elabs.se')
Expand Down
2 changes: 1 addition & 1 deletion lib/capybara/spec/test_app.rb
Expand Up @@ -23,7 +23,7 @@ class TestApp < Sinatra::Base
end

get '/host' do
"Current host is #{request.domain}"
"Current host is #{request.scheme}://#{request.host}"
end

get '/redirect/:times/times' do
Expand Down

0 comments on commit 3e5d923

Please sign in to comment.