Skip to content

Commit a97dedf

Browse files
peterzhu2118matzbot
authored andcommitted
[ruby/irb] Fix deprecation test when ran multiple times
(ruby/irb#695) ruby/irb@ae0e5bb80f
1 parent 9ea9f99 commit a97dedf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/irb/test_ruby_lex.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,10 @@ def test_assignment_expression_with_local_variable
203203
end
204204

205205
def test_initialising_the_old_top_level_ruby_lex
206-
_, err = capture_output do
206+
assert_in_out_err(["--disable-gems", "-W:deprecated"], <<~RUBY, [], /warning: constant ::RubyLex is deprecated/)
207+
require "irb"
207208
::RubyLex.new(nil)
208-
end
209-
210-
assert_match(/warning: constant ::RubyLex is deprecated/, err)
209+
RUBY
211210
end
212211

213212
private

0 commit comments

Comments
 (0)