Permalink
Browse files

Refactoring default host

  • Loading branch information...
dlibanori committed Mar 3, 2011
1 parent ef084a7 commit 55c9a99bf06bbd312babfa8e92a9c46312744eeb
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/webrat/core/session.rb
@@ -286,11 +286,15 @@ def response_location
end

def current_host
URI.parse(current_url).host || @custom_headers["Host"] || adapter.session.rack_mock_session.default_host
URI.parse(current_url).host || @custom_headers["Host"] || default_current_host
end

def response_location_host
URI.parse(response_location).host || adapter.session.rack_mock_session.default_host
URI.parse(response_location).host || default_current_host
end

def default_current_host
adapter.session.rack_mock_session.default_host
end

def reset

0 comments on commit 55c9a99

Please sign in to comment.