aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2013-08-07 05:55:58 -0700
committerSteve Klabnik <steve@steveklabnik.com>2013-08-07 05:55:58 -0700
commit4343e2dda25222d3586835bb25009e1a490cda8f (patch)
treef38d34d7cae732e3025cc95de01f5bbce2baa611
parent90e743f0fae3089caed7dd2a348deb7c11e4bf38 (diff)
parent7191a5d8307e8d5ccbf683656b5b4e9957ab34fa (diff)
downloadrails-4343e2dda25222d3586835bb25009e1a490cda8f.tar.gz
rails-4343e2dda25222d3586835bb25009e1a490cda8f.tar.bz2
rails-4343e2dda25222d3586835bb25009e1a490cda8f.zip
Merge pull request #11789 from gaurish/multibyte_methods
Avoid defining multibyte method names in JSON decoding test for JRuby Compatitibility
-rw-r--r--activesupport/test/json/decoding_test.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activesupport/test/json/decoding_test.rb b/activesupport/test/json/decoding_test.rb
index 34ed866848..99c5f2d1ec 100644
--- a/activesupport/test/json/decoding_test.rb
+++ b/activesupport/test/json/decoding_test.rb
@@ -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