Permalink
Browse files

A few minor tweaks to the integration testing stuff

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 2383a60 commit 1c0163e50c789a01d9e96aecf2014e28aa9fef51 @jamis jamis committed Mar 7, 2006
Showing with 5 additions and 1 deletion.
  1. +5 −1 actionpack/lib/action_controller/integration_test.rb
@@ -93,6 +93,10 @@ def host!(name)
@host
end
+ # To make setting the host more natural when using a session object
+ # directly: foo.host = "blah"
+ alias_method :host=, :host!
+
# Follow a single redirect response. If the last response was not a
# redirect, an exception will be raised. Otherwise, the redirect is
# performed on the location header.
@@ -173,7 +177,7 @@ def initialize(env, input=nil)
def interpret_uri(path)
location = URI.parse(path)
https! URI::HTTPS === location
- host! location.host
+ host! location.host if location.host
location.query ? "#{location.path}?#{location.query}" : location.path
end

0 comments on commit 1c0163e

Please sign in to comment.