From d5c6566b4127b80641fc932e03cf24455c5d883e Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Thu, 25 Jun 2020 02:42:44 -0400 Subject: [PATCH] Fix test that wasn't testing anything --- tests/json_fixtures_test.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/json_fixtures_test.rb b/tests/json_fixtures_test.rb index 01954fe7..b2a1ec8b 100644 --- a/tests/json_fixtures_test.rb +++ b/tests/json_fixtures_test.rb @@ -3,7 +3,7 @@ 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 @@ def test_failing end end end + + def test_sanity + assert(@passed.size > 5) + assert(@failed.size > 20) + end end