From 053a0f6ac48d35fd39d385df5d810078e92c521e Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 13 Sep 2009 05:43:02 -0700 Subject: Clean up spurious JSON decoding test failure --- activesupport/test/json/decoding_test.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'activesupport/test') 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 -- cgit v1.2.3