aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/middleware
diff options
context:
space:
mode:
authorTara Scherner de la Fuente <tara.scherner@livingsocial.com>2016-02-19 20:05:49 -0800
committerTara Scherner de la Fuente <tara.scherner@livingsocial.com>2016-02-22 22:56:23 -0800
commit926a24a7510be3d7f611c03feaf83f50d36076e8 (patch)
tree2a0ebb41c6f3eea9456bff1d7ebd79ac647dd6bd /railties/test/application/middleware
parent42ad173d19a2220996ec4172d05681bde2e7320b (diff)
downloadrails-926a24a7510be3d7f611c03feaf83f50d36076e8.tar.gz
rails-926a24a7510be3d7f611c03feaf83f50d36076e8.tar.bz2
rails-926a24a7510be3d7f611c03feaf83f50d36076e8.zip
remove args from assert_nothing_raised in tests
Diffstat (limited to 'railties/test/application/middleware')
-rw-r--r--railties/test/application/middleware/exceptions_test.rb4
-rw-r--r--railties/test/application/middleware/remote_ip_test.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/railties/test/application/middleware/exceptions_test.rb b/railties/test/application/middleware/exceptions_test.rb
index 7b4babb13b..639b01b562 100644
--- a/railties/test/application/middleware/exceptions_test.rb
+++ b/railties/test/application/middleware/exceptions_test.rb
@@ -85,7 +85,7 @@ module ApplicationTests
test "unspecified route when action_dispatch.show_exceptions is set shows 404" do
app.config.action_dispatch.show_exceptions = true
- assert_nothing_raised(ActionController::RoutingError) do
+ assert_nothing_raised do
get '/foo'
assert_match "The page you were looking for doesn't exist.", last_response.body
end
@@ -95,7 +95,7 @@ module ApplicationTests
app.config.action_dispatch.show_exceptions = true
app.config.consider_all_requests_local = true
- assert_nothing_raised(ActionController::RoutingError) do
+ assert_nothing_raised do
get '/foo'
assert_match "No route matches", last_response.body
end
diff --git a/railties/test/application/middleware/remote_ip_test.rb b/railties/test/application/middleware/remote_ip_test.rb
index 97d5b5c698..37bd8a25c1 100644
--- a/railties/test/application/middleware/remote_ip_test.rb
+++ b/railties/test/application/middleware/remote_ip_test.rb
@@ -36,10 +36,10 @@ module ApplicationTests
test "works with both headers individually" do
make_basic_app
- assert_nothing_raised(ActionDispatch::RemoteIp::IpSpoofAttackError) do
+ assert_nothing_raised do
assert_equal "1.1.1.1", remote_ip("HTTP_X_FORWARDED_FOR" => "1.1.1.1")
end
- assert_nothing_raised(ActionDispatch::RemoteIp::IpSpoofAttackError) do
+ assert_nothing_raised do
assert_equal "1.1.1.2", remote_ip("HTTP_CLIENT_IP" => "1.1.1.2")
end
end
@@ -49,7 +49,7 @@ module ApplicationTests
app.config.action_dispatch.ip_spoofing_check = false
end
- assert_nothing_raised(ActionDispatch::RemoteIp::IpSpoofAttackError) do
+ assert_nothing_raised do
assert_equal "1.1.1.1", remote_ip("HTTP_X_FORWARDED_FOR" => "1.1.1.1", "HTTP_CLIENT_IP" => "1.1.1.2")
end
end