From b5550361c9398b75578ea07a65ffb0b00f27524e Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 1 Apr 2013 15:00:36 +0000 Subject: test_optparse.rb: skip no_error in backtrace * test/optparse/test_optparse.rb (TestOptionParser#assert_no_error): prefix with assert_ so it will be skipped in backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/optparse/test_optparse.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/optparse/test_optparse.rb b/test/optparse/test_optparse.rb index 76b8f7b183..e85a2ef586 100644 --- a/test/optparse/test_optparse.rb +++ b/test/optparse/test_optparse.rb @@ -10,7 +10,7 @@ class TestOptionParser < Test::Unit::TestCase class DummyOutput < String alias write << end - def no_error(*args) + def assert_no_error(*args) $stderr, stderr = DummyOutput.new, $stderr assert_nothing_raised(*args) {return yield} ensure @@ -18,6 +18,7 @@ class TestOptionParser < Test::Unit::TestCase $!.backtrace.delete_if {|e| /\A#{Regexp.quote(__FILE__)}:#{__LINE__-2}/o =~ e} if $! assert_empty(stderr) end + alias no_error assert_no_error def test_permute assert_equal(%w"", no_error {@opt.permute!(%w"")}) -- cgit v1.2.3