Skip to content

Commit

Permalink
Refresh specs for Set#merge
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw committed Sep 24, 2024
1 parent 556eff8 commit f7b8a73
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/library/set/merge_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,16 @@
-> { Set[1, 2].merge(1) }.should raise_error(ArgumentError)
-> { Set[1, 2].merge(Object.new) }.should raise_error(ArgumentError)
end

ruby_version_is ""..."3.3" do
it "accepts only a single argument" do
-> { Set[].merge([], []) }.should raise_error(ArgumentError, "wrong number of arguments (given 2, expected 1)")
end
end

ruby_version_is "3.3" do
it "accepts multiple arguments" do
Set[:a, :b].merge(Set[:b, :c], [:d]).should == Set[:a, :b, :c, :d]
end
end
end

0 comments on commit f7b8a73

Please sign in to comment.