2011-09-06 08:20:17 -04:00
|
|
|
require 'test/unit'
|
|
|
|
|
|
|
|
class TestTestUnitSorting < Test::Unit::TestCase
|
|
|
|
def test_sorting
|
2013-06-19 03:47:26 -04:00
|
|
|
result = sorting
|
2011-09-06 08:20:17 -04:00
|
|
|
assert_match(/^ 1\) Skipped:/, result)
|
|
|
|
assert_match(/^ 2\) Failure:/, result)
|
|
|
|
assert_match(/^ 3\) Error:/, result)
|
2013-06-19 03:47:26 -04:00
|
|
|
end
|
2011-09-06 08:20:17 -04:00
|
|
|
|
2013-06-19 03:47:26 -04:00
|
|
|
def sorting(*args)
|
|
|
|
IO.popen([*@options[:ruby], "#{File.dirname(__FILE__)}/test4test_sorting.rb",
|
|
|
|
"--verbose", *args], err: [:child, :out]) {|f|
|
|
|
|
f.read
|
|
|
|
}
|
2011-09-06 08:20:17 -04:00
|
|
|
end
|
|
|
|
end
|