From f3979aec76868f4bba992d267cbca7a757f4a8b6 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 14 Apr 2023 11:26:09 +0200 Subject: Add spec for `Warning[:performance]` [Feature #19538] --- spec/ruby/core/warning/element_reference_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/ruby') 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 -- cgit v1.2.3