mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #11789 from gaurish/multibyte_methods
Avoid defining multibyte method names in JSON decoding test for JRuby Compatitibility
This commit is contained in:
commit
4343e2dda2
1 changed files with 4 additions and 3 deletions
|
@ -55,12 +55,13 @@ class TestJSONDecoding < ActiveSupport::TestCase
|
|||
%q({"a":"Line1\u000aLine2"}) => {"a"=>"Line1\nLine2"}
|
||||
}
|
||||
|
||||
TESTS.each do |json, expected|
|
||||
test "json decodes #{json}" do
|
||||
TESTS.each_with_index do |(json, expected), index|
|
||||
test "json decodes #{index}" do
|
||||
prev = ActiveSupport.parse_json_times
|
||||
ActiveSupport.parse_json_times = true
|
||||
silence_warnings do
|
||||
assert_equal expected, ActiveSupport::JSON.decode(json)
|
||||
assert_equal expected, ActiveSupport::JSON.decode(json), "JSON decoding \
|
||||
failed for #{json}"
|
||||
end
|
||||
ActiveSupport.parse_json_times = prev
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue