2020-10-10 14:16:11 +02:00
|
|
|
# typed: false
|
2019-04-19 15:38:03 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-02-27 14:02:59 +01:00
|
|
|
require "requirements"
|
|
|
|
|
|
|
|
describe Requirements do
|
|
|
|
describe "#<<" do
|
|
|
|
it "returns itself" do
|
|
|
|
expect(subject << Object.new).to be(subject)
|
|
|
|
end
|
|
|
|
|
|
|
|
it "merges duplicate requirements" do
|
2020-12-15 14:19:45 +00:00
|
|
|
subject << Requirement.new << Requirement.new
|
2017-02-27 14:02:59 +01:00
|
|
|
expect(subject.count).to eq(1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|