[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
@ -3,7 +3,7 @@ require 'test_helper'
|
|||||||
|
|
||||||
class JSONFixturesTest < Test::Unit::TestCase
|
class JSONFixturesTest < Test::Unit::TestCase
|
||||||
def setup
|
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, failed = Dir[fixtures].partition { |f| f['pass'] }
|
||||||
@passed = passed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
|
@passed = passed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
|
||||||
@failed = failed.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
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_sanity
|
||||||
|
assert(@passed.size > 5)
|
||||||
|
assert(@failed.size > 20)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user