2015-12-16 00:07:31 -05:00
|
|
|
# frozen_string_literal: false
|
2011-09-06 08:20:17 -04:00
|
|
|
require 'test/unit'
|
|
|
|
|
|
|
|
class TestTestUnitSorting < Test::Unit::TestCase
|
|
|
|
def test_sorting
|
2014-10-11 20:24:40 -04:00
|
|
|
result = sorting("--show-skip")
|
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
|