mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
20 lines
427 B
Ruby
20 lines
427 B
Ruby
# typed: false
|
|
# frozen_string_literal: true
|
|
|
|
require "requirements"
|
|
|
|
describe Requirements do
|
|
describe "#<<" do
|
|
it "returns itself" do
|
|
expect(subject << Object.new).to be(subject)
|
|
end
|
|
|
|
it "merges duplicate requirements" do
|
|
subject << X11Requirement.new << X11Requirement.new
|
|
expect(subject.count).to eq(1)
|
|
subject << Requirement.new
|
|
expect(subject.count).to eq(2)
|
|
end
|
|
end
|
|
end
|