summaryrefslogtreecommitdiff
path: root/test/testunit
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-10 05:53:46 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-10 05:53:46 +0000
commit64495a2f85e8c661af0b60e360eaafcc457c3183 (patch)
tree66d8e95f096c3865473dcec7feba7539732e09d4 /test/testunit
parentf47ff4821dbed8c3b9fa8a545743d82989673ba5 (diff)
* lib/test/unit.rb: Add option for hiding skip messages when test
ends. #4657 * test/testunit/test_hideskip.rb, test/testunit/test4test_hideskip.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/testunit')
-rw-r--r--test/testunit/test4test_hideskip.rb7
-rw-r--r--test/testunit/test_hideskip.rb20
2 files changed, 27 insertions, 0 deletions
diff --git a/test/testunit/test4test_hideskip.rb b/test/testunit/test4test_hideskip.rb
new file mode 100644
index 0000000..6fe3284
--- /dev/null
+++ b/test/testunit/test4test_hideskip.rb
@@ -0,0 +1,7 @@
+require 'test/unit'
+
+class TestForTestHideSkip < Test::Unit::TestCase
+ def test_skip
+ skip
+ end
+end
diff --git a/test/testunit/test_hideskip.rb b/test/testunit/test_hideskip.rb
new file mode 100644
index 0000000..967ecaf
--- /dev/null
+++ b/test/testunit/test_hideskip.rb
@@ -0,0 +1,20 @@
+require 'test/unit'
+
+class TestHideSkip < Test::Unit::TestCase
+ def test_hideskip
+ test_out, o = IO.pipe
+ spawn(*@options[:ruby], "#{File.dirname(__FILE__)}/test4test_hideskip.rb",
+ out: o, err: o)
+ o.close
+ assert_match(/assertions\/s.\n\n 1\) Skipped/,test_out.read)
+ test_out.close
+
+ test_out, o = IO.pipe
+ spawn(*@options[:ruby], "#{File.dirname(__FILE__)}/test4test_hideskip.rb",
+ "--hide-skip", out: o, err: o)
+ o.close
+ assert_match(/assertions\/s.\n\n1 tests, 0 assertions, 0 failures, 0 errors, 1 skips/,
+ test_out.read)
+ test_out.close
+ end
+end