summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2020-06-25 02:42:44 -0400
committerMarc-Andre Lafortune <github@marc-andre.ca>2020-06-25 02:45:21 -0400
commitd5c6566b4127b80641fc932e03cf24455c5d883e (patch)
tree3584ae364ca4b171088ba43a31154bcb47d758ee
parentfb6eefed8ecfda0bac0640e07f0daa85eed259d3 (diff)
downloadjson-d5c6566b4127b80641fc932e03cf24455c5d883e.tar.gz
Fix test that wasn't testing anything
-rw-r--r--tests/json_fixtures_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/json_fixtures_test.rb b/tests/json_fixtures_test.rb
index 01954fe..b2a1ec8 100644
--- a/tests/json_fixtures_test.rb
+++ b/tests/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