aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/show_exceptions_test.rb6
-rw-r--r--actionpack/test/dispatch/cookies_test.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/test/controller/show_exceptions_test.rb b/actionpack/test/controller/show_exceptions_test.rb
index 39245e9574..74067cb895 100644
--- a/actionpack/test/controller/show_exceptions_test.rb
+++ b/actionpack/test/controller/show_exceptions_test.rb
@@ -22,7 +22,7 @@ module ShowExceptions
['127.0.0.1', '127.0.0.127', '::1', '0:0:0:0:0:0:0:1', '0:0:0:0:0:0:0:1%0'].each do |ip_address|
self.remote_addr = ip_address
get '/'
- assert_match /boom/, body
+ assert_match(/boom/, body)
end
end
@@ -31,7 +31,7 @@ module ShowExceptions
@app = ShowExceptionsController.action(:boom)
self.remote_addr = '208.77.188.166'
get '/'
- assert_match /boom/, body
+ assert_match(/boom/, body)
end
end
@@ -53,7 +53,7 @@ module ShowExceptions
test 'show diagnostics message' do
@app = ShowExceptionsOverridenController.action(:boom)
get '/', {'detailed' => '1'}
- assert_match /boom/, body
+ assert_match(/boom/, body)
end
end
end
diff --git a/actionpack/test/dispatch/cookies_test.rb b/actionpack/test/dispatch/cookies_test.rb
index 49da448001..3765b7eb44 100644
--- a/actionpack/test/dispatch/cookies_test.rb
+++ b/actionpack/test/dispatch/cookies_test.rb
@@ -210,8 +210,8 @@ class CookiesTest < ActionController::TestCase
assert_equal({"user_name" => "david"}, @response.cookies)
end
- def test_setting_cookie_with_secure_in_development
- Rails.env.stubs(:development?).returns(true)
+ def test_setting_cookie_with_secure_when_always_write_cookie_is_true
+ ActionDispatch::Cookies::CookieJar.any_instance.stubs(:always_write_cookie).returns(true)
get :authenticate_with_secure
assert_cookie_header "user_name=david; path=/; secure"
assert_equal({"user_name" => "david"}, @response.cookies)