mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
|
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…
Add table
Add a link
Reference in a new issue