diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-22 16:03:39 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-27 11:19:19 -0300 |
commit | 2d274a520857b159bd4dd0206fc7cd09a9356b86 (patch) | |
tree | 62c107ac9193915763e0f79e5de26da09b9657cf /actionpack/test/dispatch/show_exceptions_test.rb | |
parent | be9883b09d05b90c2422502f38ab69081e29e4ce (diff) | |
download | rails-2d274a520857b159bd4dd0206fc7cd09a9356b86.tar.gz rails-2d274a520857b159bd4dd0206fc7cd09a9356b86.tar.bz2 rails-2d274a520857b159bd4dd0206fc7cd09a9356b86.zip |
Use parentheses when using assert_match followed by a regexp to avoid warnings.
Diffstat (limited to 'actionpack/test/dispatch/show_exceptions_test.rb')
-rw-r--r-- | actionpack/test/dispatch/show_exceptions_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb index 5b181600e8..4ede1ab47c 100644 --- a/actionpack/test/dispatch/show_exceptions_test.rb +++ b/actionpack/test/dispatch/show_exceptions_test.rb @@ -58,15 +58,15 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest get "/", {}, {'action_dispatch.show_exceptions' => true} assert_response 500 - assert_match /puke/, body + assert_match(/puke/, body) get "/not_found", {}, {'action_dispatch.show_exceptions' => true} assert_response 404 - assert_match /#{ActionController::UnknownAction.name}/, body + assert_match(/#{ActionController::UnknownAction.name}/, body) get "/method_not_allowed", {}, {'action_dispatch.show_exceptions' => true} assert_response 405 - assert_match /ActionController::MethodNotAllowed/, body + assert_match(/ActionController::MethodNotAllowed/, body) end end @@ -96,15 +96,15 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest get "/", {}, {'action_dispatch.show_exceptions' => true} assert_response 500 - assert_match /puke/, body + assert_match(/puke/, body) get "/not_found", {}, {'action_dispatch.show_exceptions' => true} assert_response 404 - assert_match /#{ActionController::UnknownAction.name}/, body + assert_match(/#{ActionController::UnknownAction.name}/, body) get "/method_not_allowed", {}, {'action_dispatch.show_exceptions' => true} assert_response 405 - assert_match /ActionController::MethodNotAllowed/, body + assert_match(/ActionController::MethodNotAllowed/, body) end test "does not show filtered parameters" do @@ -113,6 +113,6 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest get "/", {"foo"=>"bar"}, {'action_dispatch.show_exceptions' => true, 'action_dispatch.parameter_filter' => [:foo]} assert_response 500 - assert_match ""foo"=>"[FILTERED]"", body + assert_match(""foo"=>"[FILTERED]"", body) end end |