Skip to content

Commit

Permalink
Suppress Ruby warnings in certain backtrace filtering tests
Browse files Browse the repository at this point in the history
Since they're sensitive to the warnings, and the warnings are
not relevant to the tests, we can suppress them to keep the tests
simple.
  • Loading branch information
st0012 committed Jun 9, 2024
1 parent dd339e6 commit 0fd1656
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/irb/test_irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,13 @@ def build_irb
end

class BacktraceFilteringTest < TestIRB::IntegrationTestCase
def setup
super
# These tests are sensitive to warnings, so we disable them
original_rubyopt = [ENV["RUBYOPT"], @envs["RUBYOPT"]].compact.join(" ")
@envs["RUBYOPT"] = original_rubyopt + " -W0"
end

def test_backtrace_filtering
write_ruby <<~'RUBY'
def foo
Expand Down

0 comments on commit 0fd1656

Please sign in to comment.