mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[flori/json] Fix test that wasn't testing anything
https://github.com/flori/json/commit/d5c6566b41
This commit is contained in:
parent
4689fd5f99
commit
fe10323a35
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue