Removed info_spec integration test and replaced with unit test in missing_formula_spec
This commit is contained in:
parent
e9b17b8593
commit
63a0aa92d1
@ -20,13 +20,6 @@ describe "brew info", :integration_test do
|
||||
end
|
||||
end
|
||||
|
||||
describe "brew info", :integration_test, :needs_macos do
|
||||
it "looks for a Cask with the same name if a given Formula does not exist" do
|
||||
expect { brew "info", "basic-cask" }
|
||||
.to output(/Found the following cask named "basic-cask" instead:\nbasic-cask: .+\n/).to_stderr
|
||||
end
|
||||
end
|
||||
|
||||
describe Homebrew do
|
||||
let(:remote) { "https://github.com/Homebrew/homebrew-core" }
|
||||
|
||||
|
||||
@ -136,4 +136,20 @@ describe Homebrew::MissingFormula do
|
||||
it { is_expected.to be_nil }
|
||||
end
|
||||
end
|
||||
|
||||
describe "::cask_reason", :cask do
|
||||
subject { described_class.cask_reason(formula) }
|
||||
|
||||
context "with a missing formula that exists as a cask" do
|
||||
let(:formula) { "local-caffeine" }
|
||||
|
||||
it { is_expected.to match(/Found the following cask named "local-caffeine" instead:\nlocal-caffeine: 1.2.3\n/) }
|
||||
end
|
||||
|
||||
context "with a missing formula that does not share a name with a cask" do
|
||||
let(:formula) { "missing-formula" }
|
||||
|
||||
it { is_expected.to be_nil }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user