diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-04-18 21:39:15 +0200 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-04-18 21:39:15 +0200 |
commit | e019587e31abe66416c0b5d26b6ac177b345a727 (patch) | |
tree | 00b18ceb7f6852ca8a2e76885eb3757f65910917 /activesupport/test | |
parent | 3e335923161b4074cb048b2a828b0588fcf98b16 (diff) | |
download | rails-e019587e31abe66416c0b5d26b6ac177b345a727.tar.gz rails-e019587e31abe66416c0b5d26b6ac177b345a727.tar.bz2 rails-e019587e31abe66416c0b5d26b6ac177b345a727.zip |
removed AS backends and instead rely on MultiJson for json decoding
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/json/decoding_test.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/activesupport/test/json/decoding_test.rb b/activesupport/test/json/decoding_test.rb index 88cf97de7e..0e6772e284 100644 --- a/activesupport/test/json/decoding_test.rb +++ b/activesupport/test/json/decoding_test.rb @@ -56,12 +56,9 @@ class TestJSONDecoding < ActiveSupport::TestCase %q({"a":"Line1\u000aLine2"}) => {"a"=>"Line1\nLine2"} } - # load the default JSON backend - ActiveSupport::JSON.backend = 'Yaml' - - backends = %w(Yaml) - backends << "JSONGem" if defined?(::JSON) - backends << "Yajl" if defined?(::Yajl) + backends = [:ok_json] + backends << :json_gem if defined?(::JSON) + backends << :yajl if defined?(::Yajl) backends.each do |backend| TESTS.each do |json, expected| @@ -85,7 +82,7 @@ class TestJSONDecoding < ActiveSupport::TestCase end def test_failed_json_decoding - assert_raise(ActiveSupport::JSON.parse_error) { ActiveSupport::JSON.decode(%({: 1})) } + assert_raise(MultiJson::DecodeError) { ActiveSupport::JSON.decode(%({: 1})) } end end |