summaryrefslogtreecommitdiff
path: root/test/optparse
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-01 15:00:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-01 15:00:36 +0000
commitb5550361c9398b75578ea07a65ffb0b00f27524e (patch)
tree8229e30e9eaa09763f6c7911bdeb2218684c7bd9 /test/optparse
parent87877eb04f5376b651e501cd7aa451c870df7411 (diff)
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
Diffstat (limited to 'test/optparse')
-rw-r--r--test/optparse/test_optparse.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/optparse/test_optparse.rb b/test/optparse/test_optparse.rb
index 76b8f7b..e85a2ef 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"")})