Skip to content

Commit

Permalink
Merge pull request #416 from marcandre/red_green_please
Browse files Browse the repository at this point in the history
fixtures/ are not being tested...
  • Loading branch information
hsbt committed Jun 25, 2020
2 parents 23aabc2 + d5c6566 commit 834494c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/json_fixtures_test.rb
Expand Up @@ -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
Expand All @@ -29,4 +29,9 @@ def test_failing
end
end
end

def test_sanity
assert(@passed.size > 5)
assert(@failed.size > 20)
end
end

0 comments on commit 834494c

Please sign in to comment.