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
@ -10,7 +10,7 @@ class TestOptionParser < Test::Unit::TestCase
|
|||||||
class DummyOutput < String
|
class DummyOutput < String
|
||||||
alias write <<
|
alias write <<
|
||||||
end
|
end
|
||||||
def no_error(*args)
|
def assert_no_error(*args)
|
||||||
$stderr, stderr = DummyOutput.new, $stderr
|
$stderr, stderr = DummyOutput.new, $stderr
|
||||||
assert_nothing_raised(*args) {return yield}
|
assert_nothing_raised(*args) {return yield}
|
||||||
ensure
|
ensure
|
||||||
@ -18,6 +18,7 @@ class TestOptionParser < Test::Unit::TestCase
|
|||||||
$!.backtrace.delete_if {|e| /\A#{Regexp.quote(__FILE__)}:#{__LINE__-2}/o =~ e} if $!
|
$!.backtrace.delete_if {|e| /\A#{Regexp.quote(__FILE__)}:#{__LINE__-2}/o =~ e} if $!
|
||||||
assert_empty(stderr)
|
assert_empty(stderr)
|
||||||
end
|
end
|
||||||
|
alias no_error assert_no_error
|
||||||
|
|
||||||
def test_permute
|
def test_permute
|
||||||
assert_equal(%w"", no_error {@opt.permute!(%w"")})
|
assert_equal(%w"", no_error {@opt.permute!(%w"")})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user