1
0
Fork 0
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:
Marc-Andre Lafortune 2020-06-25 02:42:44 -04:00 committed by Hiroshi SHIBATA
parent 4689fd5f99
commit fe10323a35
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -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