diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-01 17:34:50 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-01 17:34:50 +0000 |
commit | c97f2eedfaa9d5ed82a3008ae35fa95146bbdade (patch) | |
tree | 18f7c54ef29c879c9a3c342bcea594bde36ca2b5 /test/json/test_json_fixtures.rb | |
parent | b8d12c58cf3e5161c21181cbba16d7a2003c7b5f (diff) | |
download | ruby-c97f2eedfaa9d5ed82a3008ae35fa95146bbdade.tar.gz ruby-c97f2eedfaa9d5ed82a3008ae35fa95146bbdade.tar.xz ruby-c97f2eedfaa9d5ed82a3008ae35fa95146bbdade.zip |
Add tests of JSON 1.1.9.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/json/test_json_fixtures.rb')
-rwxr-xr-x | test/json/test_json_fixtures.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/json/test_json_fixtures.rb b/test/json/test_json_fixtures.rb index 6cc1bfc6f..95e57ebfd 100755 --- a/test/json/test_json_fixtures.rb +++ b/test/json/test_json_fixtures.rb @@ -1,7 +1,12 @@ #!/usr/bin/env ruby +# -*- coding: utf-8 -*- require 'test/unit' -require 'json' +case ENV['JSON'] +when 'pure' then require 'json/pure' +when 'ext' then require 'json/ext' +else require 'json' +end class TC_JSONFixtures < Test::Unit::TestCase def setup @@ -20,7 +25,7 @@ class TC_JSONFixtures < Test::Unit::TestCase def test_failing for name, source in @failed - assert_raise(JSON::ParserError, JSON::NestingError, + assert_raises(JSON::ParserError, JSON::NestingError, "Did not fail for fixture '#{name}'") do JSON.parse(source) end |