diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-13 05:43:02 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-13 05:43:02 -0700 |
commit | 053a0f6ac48d35fd39d385df5d810078e92c521e (patch) | |
tree | 267b87f3e9d07f955e4d5122c1da83597dc631a2 /activesupport/test | |
parent | 7d2add8c966b318144bb5c5c43112cc02341ead4 (diff) | |
download | rails-053a0f6ac48d35fd39d385df5d810078e92c521e.tar.gz rails-053a0f6ac48d35fd39d385df5d810078e92c521e.tar.bz2 rails-053a0f6ac48d35fd39d385df5d810078e92c521e.zip |
Clean up spurious JSON decoding test failure
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/json/decoding_test.rb | 10 |
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 |