diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 15:59:30 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 15:59:30 -0700 |
commit | db41f33d7c9ec436b78d2eb3afa96c9afcc9cca5 (patch) | |
tree | 9edcf50045e9aaaf9cbc7b7aa0aeb0bb36b53332 /actionpack/test | |
parent | 3cae6bc5fc8765b5a06fd3d123528159d1f850b7 (diff) | |
download | rails-db41f33d7c9ec436b78d2eb3afa96c9afcc9cca5.tar.gz rails-db41f33d7c9ec436b78d2eb3afa96c9afcc9cca5.tar.bz2 rails-db41f33d7c9ec436b78d2eb3afa96c9afcc9cca5.zip |
make `env` a required parameter
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/test_request_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/dispatch/test_request_test.rb b/actionpack/test/dispatch/test_request_test.rb index a4c124070a..5613d4a879 100644 --- a/actionpack/test/dispatch/test_request_test.rb +++ b/actionpack/test/dispatch/test_request_test.rb @@ -2,7 +2,7 @@ require 'abstract_unit' class TestRequestTest < ActiveSupport::TestCase test "sane defaults" do - env = ActionDispatch::TestRequest.new.env + env = ActionDispatch::TestRequest.new({}).env assert_equal "GET", env.delete("REQUEST_METHOD") assert_equal "off", env.delete("HTTPS") @@ -27,7 +27,7 @@ class TestRequestTest < ActiveSupport::TestCase end test "cookie jar" do - req = ActionDispatch::TestRequest.new + req = ActionDispatch::TestRequest.new({}) assert_equal({}, req.cookies) assert_equal nil, req.env["HTTP_COOKIE"] @@ -55,13 +55,13 @@ class TestRequestTest < ActiveSupport::TestCase test "does not complain when Rails.application is nil" do Rails.stubs(:application).returns(nil) - req = ActionDispatch::TestRequest.new + req = ActionDispatch::TestRequest.new({}) assert_equal false, req.env.empty? end test "default remote address is 0.0.0.0" do - req = ActionDispatch::TestRequest.new + req = ActionDispatch::TestRequest.new({}) assert_equal '0.0.0.0', req.remote_addr end @@ -71,7 +71,7 @@ class TestRequestTest < ActiveSupport::TestCase end test "default host is test.host" do - req = ActionDispatch::TestRequest.new + req = ActionDispatch::TestRequest.new({}) assert_equal 'test.host', req.host end @@ -81,7 +81,7 @@ class TestRequestTest < ActiveSupport::TestCase end test "default user agent is 'Rails Testing'" do - req = ActionDispatch::TestRequest.new + req = ActionDispatch::TestRequest.new({}) assert_equal 'Rails Testing', req.user_agent end |