Skip to content

Commit

Permalink
Fix test that wasn't testing anything
Browse files Browse the repository at this point in the history
  • Loading branch information
marcandre committed Jun 25, 2020
1 parent ec1eaf2 commit 3c89583
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 3c89583

Please sign in to comment.