2011-05-10 01:53:46 -04:00
|
|
|
require 'test/unit'
|
|
|
|
|
|
|
|
class TestHideSkip < Test::Unit::TestCase
|
|
|
|
def test_hideskip
|
2014-10-11 20:24:40 -04:00
|
|
|
assert_not_match(/assertions\/s.\n\n 1\) Skipped/, hideskip)
|
2013-06-19 03:47:26 -04:00
|
|
|
assert_match(/assertions\/s.\n\n 1\) Skipped/, hideskip("--show-skip"))
|
|
|
|
assert_match(/assertions\/s.\n\n1 tests, 0 assertions, 0 failures, 0 errors, 1 skips/, hideskip("--hide-skip"))
|
|
|
|
end
|
2012-02-22 04:47:24 -05:00
|
|
|
|
2013-06-19 03:47:26 -04:00
|
|
|
def hideskip(*args)
|
|
|
|
IO.popen([*@options[:ruby], "#{File.dirname(__FILE__)}/test4test_hideskip.rb",
|
|
|
|
"--verbose", *args], err: [:child, :out]) {|f|
|
|
|
|
f.read
|
|
|
|
}
|
2011-05-10 01:53:46 -04:00
|
|
|
end
|
|
|
|
end
|