summaryrefslogtreecommitdiff
path: root/test/json/test_json_fixtures.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-01 17:34:50 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-01 17:34:50 +0000
commitd99ac4f829dd0903f20e02de5dbba0ddc175c1f3 (patch)
tree18f7c54ef29c879c9a3c342bcea594bde36ca2b5 /test/json/test_json_fixtures.rb
parent596b68cc6b6333a3939ebca3ae09fecc491e5718 (diff)
Add tests of JSON 1.1.9.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/json/test_json_fixtures.rb')
-rwxr-xr-xtest/json/test_json_fixtures.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/json/test_json_fixtures.rb b/test/json/test_json_fixtures.rb
index 6cc1bfc..95e57eb 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