summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJean Boussier <byroot@ruby-lang.org>2023-04-14 11:26:09 +0200
committerJean Boussier <jean.boussier@gmail.com>2023-04-17 10:29:46 +0200
commitf3979aec76868f4bba992d267cbca7a757f4a8b6 (patch)
treed10ed5727f7cb0b8e429edd547aa4977b78b7838 /spec
parenta0d1069e03fd52355e26d8cc3cbbed34632876e6 (diff)
downloadruby-f3979aec76868f4bba992d267cbca7a757f4a8b6.tar.gz
Add spec for `Warning[:performance]`
[Feature #19538]
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/warning/element_reference_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/ruby/core/warning/element_reference_spec.rb b/spec/ruby/core/warning/element_reference_spec.rb
index 67728ca0f6..41129e533a 100644
--- a/spec/ruby/core/warning/element_reference_spec.rb
+++ b/spec/ruby/core/warning/element_reference_spec.rb
@@ -8,6 +8,13 @@ describe "Warning.[]" do
end
end
+ ruby_version_is '3.3' do
+ it "returns default values for :performance category" do
+ ruby_exe('p Warning[:performance]').chomp.should == "false"
+ ruby_exe('p Warning[:performance]', options: "-w").chomp.should == "false"
+ end
+ end
+
it "raises for unknown category" do
-> { Warning[:noop] }.should raise_error(ArgumentError, /unknown category: noop/)
end