mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
25 lines
537 B
Ruby
25 lines
537 B
Ruby
![]() |
require "dependable"
|
||
|
|
||
|
RSpec::Matchers.alias_matcher :be_a_build_dependency, :be_build
|
||
|
|
||
|
describe Dependable do
|
||
|
subject { double(tags: tags).extend(described_class) }
|
||
|
let(:tags) { ["foo", "bar", :build] }
|
||
|
|
||
|
specify "#options" do
|
||
|
expect(subject.options.as_flags.sort).to eq(%w[--foo --bar].sort)
|
||
|
end
|
||
|
|
||
|
specify "#build?" do
|
||
|
expect(subject).to be_a_build_dependency
|
||
|
end
|
||
|
|
||
|
specify "#optional?" do
|
||
|
expect(subject).not_to be_optional
|
||
|
end
|
||
|
|
||
|
specify "#recommended?" do
|
||
|
expect(subject).not_to be_recommended
|
||
|
end
|
||
|
end
|