Skip to content

Commit

Permalink
Add spec for Warning[:performance]
Browse files Browse the repository at this point in the history
[Feature #19538]
  • Loading branch information
byroot authored and eregon committed Apr 25, 2023
1 parent b19eb32 commit 4d81c20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/warning/element_reference_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
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
Expand Down

0 comments on commit 4d81c20

Please sign in to comment.