summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2020-06-25 02:42:44 -0400
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-07-01 18:47:51 +0900
commitfe10323a35d20d7ab5d4291e23eb04fb3ef77a2b (patch)
treee42e99a9ec73b07cd4d92ba07fb7051dc2a107c5 /test/json
parent4689fd5f9982a148052d76e8e1a7bd85256baec6 (diff)
downloadruby-fe10323a35d20d7ab5d4291e23eb04fb3ef77a2b.tar.gz
[flori/json] Fix test that wasn't testing anything
https://github.com/flori/json/commit/d5c6566b41
Diffstat (limited to 'test/json')
-rw-r--r--test/json/json_fixtures_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/json/json_fixtures_test.rb b/test/json/json_fixtures_test.rb
index 01954fe707..b2a1ec8b8c 100644
--- a/test/json/json_fixtures_test.rb
+++ b/test/json/json_fixtures_test.rb
@@ -3,7 +3,7 @@ require 'test_helper'
class JSONFixturesTest < Test::Unit::TestCase
def setup
- fixtures = File.join(File.dirname(__FILE__), 'fixtures/{fail,pass}.json')
+ fixtures = File.join(File.dirname(__FILE__), 'fixtures/{fail,pass}*.json')
passed, failed = Dir[fixtures].partition { |f| f['pass'] }
@passed = passed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
@failed = failed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
@@ -29,4 +29,9 @@ class JSONFixturesTest < Test::Unit::TestCase
end
end
end
+
+ def test_sanity
+ assert(@passed.size > 5)
+ assert(@failed.size > 20)
+ end
end