Skip to content

Commit 3b018d0

Browse files
committed
Use @request.host shortcut again in with_hosts test helper function
1 parent b3614a8 commit 3b018d0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/test_helper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ def with_host(host, &block)
102102
self.host = host
103103
else
104104
# ActionController::TestCase
105-
original_host = @request.headers['HOST']
106-
@request.headers['HOST'] = host
105+
original_host = @request.host
106+
@request.host = host
107107
end
108108
block.call
109109
ensure
110110
if respond_to?(:host=)
111111
self.host = original_host
112112
else
113-
@request.headers['HOST'] = original_host
113+
@request.host = original_host
114114
end
115115
end
116116

0 commit comments

Comments
 (0)