Skip to content

Commit

Permalink
add spec for CLI option "-W:no-deprecated" introduced in Ruby 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lxxxvi authored and eregon committed Oct 21, 2020
1 parent 947c8bb commit 28ff1f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions command_line/dash_upper_w_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@
describe "The -W command line option with 2" do
it_behaves_like :command_line_verbose, "-W2"
end

ruby_version_is "2.7" do
describe "The -W command line option with :no-deprecated" do
it "suppresses deprecation warnings" do
result = ruby_exe('$; = ""', args: '2>&1')
result.should =~ /is deprecated/

result = ruby_exe('$; = ""', options: '-W:no-deprecated', args: '2>&1')
result.should == ""
end
end
end

0 comments on commit 28ff1f9

Please sign in to comment.