1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2022-04-25 14:53:54 +02:00
parent 6ae81d49b5
commit 45cf4f2187
277 changed files with 3844 additions and 7624 deletions

View file

@ -19,29 +19,26 @@ describe "The -W command line option with 2" do
it_behaves_like :command_line_verbose, "-W2"
end
# Regarding the defaults, see core/warning/element_reference_spec.rb
ruby_version_is "2.7" do
describe "The -W command line option with :deprecated" do
it "enables deprecation warnings" do
ruby_exe('p Warning[:deprecated]', options: '-W:deprecated').should == "true\n"
end
end
describe "The -W command line option with :no-deprecated" do
it "suppresses deprecation warnings" do
ruby_exe('p Warning[:deprecated]', options: '-w -W:no-deprecated').should == "false\n"
end
end
describe "The -W command line option with :experimental" do
it "enables experimental warnings" do
ruby_exe('p Warning[:experimental]', options: '-W:experimental').should == "true\n"
end
end
describe "The -W command line option with :no-experimental" do
it "suppresses experimental warnings" do
ruby_exe('p Warning[:experimental]', options: '-w -W:no-experimental').should == "false\n"
end
describe "The -W command line option with :deprecated" do
it "enables deprecation warnings" do
ruby_exe('p Warning[:deprecated]', options: '-W:deprecated').should == "true\n"
end
end
describe "The -W command line option with :no-deprecated" do
it "suppresses deprecation warnings" do
ruby_exe('p Warning[:deprecated]', options: '-w -W:no-deprecated').should == "false\n"
end
end
describe "The -W command line option with :experimental" do
it "enables experimental warnings" do
ruby_exe('p Warning[:experimental]', options: '-W:experimental').should == "true\n"
end
end
describe "The -W command line option with :no-experimental" do
it "suppresses experimental warnings" do
ruby_exe('p Warning[:experimental]', options: '-w -W:no-experimental').should == "false\n"
end
end