2015-12-16 00:07:31 -05:00
|
|
|
# frozen_string_literal: false
|
2011-05-10 01:53:46 -04:00
|
|
|
require 'test/unit'
|
|
|
|
|
|
|
|
class TestHideSkip < Test::Unit::TestCase
|
|
|
|
def test_hideskip
|
2016-02-26 23:16:44 -05:00
|
|
|
assert_not_match(/^ *1\) Skipped/, hideskip)
|
|
|
|
assert_match(/^ *1\) Skipped/, hideskip("--show-skip"))
|
|
|
|
assert_match(/assertions\/s.\n+1 tests, 0 assertions, 0 failures, 0 errors, 1 skips/, hideskip("--hide-skip"))
|
2013-06-19 03:47:26 -04:00
|
|
|
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
|