Skip to content
Browse files

Avoid hardcoded value in test setup/teardown.

  • Loading branch information...
1 parent bb8b214 commit 6a75e2ce1033669f99aed6f1f8295c138edb4d47 @zuhao zuhao committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/test/dispatch/request/query_string_parsing_test.rb
View
3 actionpack/test/dispatch/request/query_string_parsing_test.rb
@@ -105,6 +105,7 @@ def test_array_parses_without_nil
end
test "perform_deep_munge" do
+ old_perform_deep_munge = ActionDispatch::Request::Utils.perform_deep_munge
ActionDispatch::Request::Utils.perform_deep_munge = false
begin
assert_parses({"action" => nil}, "action")
@@ -115,7 +116,7 @@ def test_array_parses_without_nil
assert_parses({"action" => {"foo" => [{"bar" => nil}]}}, "action[foo][][bar]")
assert_parses({"action" => ['1',nil]}, "action[]=1&action[]")
ensure
- ActionDispatch::Request::Utils.perform_deep_munge = true
+ ActionDispatch::Request::Utils.perform_deep_munge = old_perform_deep_munge
end
end

0 comments on commit 6a75e2c

Please sign in to comment.
Something went wrong with that request. Please try again.