aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-03-29 09:34:52 +0100
committerMike McQuaid2017-03-29 09:34:52 +0100
commit51ca9025a5c094d048d248f5fa0e4bf8990bc421 (patch)
tree866a4f44d02bb31d1baf01d5f9f1ee6e8e5d1345
parent8608d1ea78cbe7c6dc851a3ad8f083dd6b399293 (diff)
downloadbrew-51ca9025a5c094d048d248f5fa0e4bf8990bc421.tar.bz2
formula_installer_spec: add default formula test.
Test the situation where a requirement is satisfied by a non-formula but the `default_formula` is also installed.
-rw-r--r--Library/Homebrew/test/formula_installer_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/test/formula_installer_spec.rb b/Library/Homebrew/test/formula_installer_spec.rb
index f5218db73..efe2bf5a2 100644
--- a/Library/Homebrew/test/formula_installer_spec.rb
+++ b/Library/Homebrew/test/formula_installer_spec.rb
@@ -159,6 +159,13 @@ describe FormulaInstaller do
it { is_expected.to be false }
end
+ context "it returns false when requirement is satisfied but default formula is installed" do
+ let(:satisfied?) { true }
+ let(:satisfied_by_formula?) { false }
+ let(:installed?) { true }
+ it { is_expected.to be false }
+ end
+
context "it returns true when requirement isn't satisfied" do
let(:satisfied?) { false }
let(:satisfied_by_formula?) { false }