summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-25 15:58:02 +0900
committerGitHub <noreply@github.com>2020-06-25 15:58:02 +0900
commit834494cbe104ab44bc2933d4bd77ff90d25efbb3 (patch)
treed3f909b1258375a293c6b9224cf5611f8cf5f9ad
parent23aabc288dc380441254edc9e9df2f3bc6bdda6e (diff)
parentd5c6566b4127b80641fc932e03cf24455c5d883e (diff)
downloadjson-834494cbe104ab44bc2933d4bd77ff90d25efbb3.tar.gz
Merge pull request #416 from marcandre/red_green_please
fixtures/ are not being tested...
-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