mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
87877eb04f
commit
b5550361c9
1 changed files with 2 additions and 1 deletions
|
@ -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"")})
|
||||
|
|
Loading…
Reference in a new issue