summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2010-12-31 18:19:36 +0100
committerFlorian Frank <flori@ping.de>2011-01-02 21:13:44 +0100
commit51eb5f8cac8f1a44f503dbeaef027a907c4ac23a (patch)
treefd5e87ea38115db96bfdfcd4fd7ed3ba20a84fc6 /tests
parent632804116e13931ffbb41fe4b3916428c911b2c6 (diff)
downloadjson-51eb5f8cac8f1a44f503dbeaef027a907c4ac23a.tar.gz
use JSON.iconv abstraction
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_json_fixtures.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_json_fixtures.rb b/tests/test_json_fixtures.rb
index 95e57eb..378667f 100755
--- a/tests/test_json_fixtures.rb
+++ b/tests/test_json_fixtures.rb
@@ -18,15 +18,20 @@ class TC_JSONFixtures < Test::Unit::TestCase
def test_passing
for name, source in @passed
- assert JSON.parse(source),
- "Did not pass for fixture '#{name}'"
+ begin
+ assert JSON.parse(source),
+ "Did not pass for fixture '#{name}': #{source.inspect}"
+ rescue => e
+ warn "\nCaught #{e.class}(#{e}) for fixture '#{name}': #{source.inspect}\n#{e.backtrace * "\n"}"
+ raise e
+ end
end
end
def test_failing
for name, source in @failed
assert_raises(JSON::ParserError, JSON::NestingError,
- "Did not fail for fixture '#{name}'") do
+ "Did not fail for fixture '#{name}': #{source.inspect}") do
JSON.parse(source)
end
end