aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/json/decoding_test.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/activesupport/test/json/decoding_test.rb b/activesupport/test/json/decoding_test.rb
index 05e420ae36..7b5a4d0416 100644
--- a/activesupport/test/json/decoding_test.rb
+++ b/activesupport/test/json/decoding_test.rb
@@ -47,13 +47,7 @@ class TestJSONDecoding < ActiveSupport::TestCase
ActiveSupport::JSON.backend
backends = %w(Yaml)
- begin
- gem 'json', '>= 1.1'
- require 'json'
- backends << "JSONGem"
- rescue Gem::LoadError
- # Skip JSON gem tests
- end
+ backends << "JSONGem" if defined?(::JSON)
backends.each do |backend|
TESTS.each do |json, expected|
@@ -81,7 +75,7 @@ class TestJSONDecoding < ActiveSupport::TestCase
end
def test_failed_json_decoding
- assert_raise(ActiveSupport::JSON::ParseError) { ActiveSupport::JSON.decode(%({: 1})) }
+ assert_raise(ActiveSupport::JSON.parse_error) { ActiveSupport::JSON.decode(%({: 1})) }
end
end