Skip to content

Commit 318252b

Browse files
committed
Fix tests
1 parent c774467 commit 318252b

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

Library/Homebrew/test/cmd/leaves_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020

2121
context "when there are only installed Formulae without dependencies", :integration_test do
2222
it "prints all installed Formulae" do
23-
setup_test_formula "foo"
23+
setup_test_formula "foo", tab_attributes: { installed_on_request: true }
2424
setup_test_formula "bar"
25-
(HOMEBREW_CELLAR/"foo/0.1/somedir").mkpath
2625

2726
expect { brew "leaves" }
2827
.to output("foo\n").to_stdout

Library/Homebrew/test/utils/autoremove_spec.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@
4343

4444
before do
4545
allow(formula_with_deps).to receive_messages(
46-
runtime_formula_dependencies: [first_formula_dep, second_formula_dep],
47-
any_installed_keg: instance_double(Keg, tab: tab_from_keg),
46+
installed_runtime_formula_dependencies: [first_formula_dep, second_formula_dep],
47+
any_installed_keg: instance_double(Keg, tab: tab_from_keg),
4848
)
4949
allow(first_formula_dep).to receive_messages(
50-
runtime_formula_dependencies: [second_formula_dep],
51-
any_installed_keg: instance_double(Keg, tab: tab_from_keg),
50+
installed_runtime_formula_dependencies: [second_formula_dep],
51+
any_installed_keg: instance_double(Keg, tab: tab_from_keg),
5252
)
5353
allow(second_formula_dep).to receive_messages(
54-
runtime_formula_dependencies: [],
55-
any_installed_keg: instance_double(Keg, tab: tab_from_keg),
54+
installed_runtime_formula_dependencies: [],
55+
any_installed_keg: instance_double(Keg, tab: tab_from_keg),
5656
)
5757
allow(formula_is_build_dep).to receive_messages(
58-
runtime_formula_dependencies: [],
59-
any_installed_keg: instance_double(Keg, tab: tab_from_keg),
58+
installed_runtime_formula_dependencies: [],
59+
any_installed_keg: instance_double(Keg, tab: tab_from_keg),
6060
)
6161
end
6262
end
@@ -65,7 +65,7 @@
6565
include_context "with formulae for dependency testing"
6666

6767
before do
68-
allow(Formulary).to receive(:factory).with("three", { prefer_stub: false, warn: false })
68+
allow(Formulary).to receive(:factory).with("three", { warn: false })
6969
.and_return(formula_is_build_dep)
7070
end
7171

@@ -157,9 +157,9 @@
157157
let(:casks_multiple_deps) { [first_cask_no_deps, second_cask_no_deps, cask_multiple_deps] }
158158

159159
before do
160-
allow(Formula).to receive("[]").with("zero").and_return(formula_with_deps)
161-
allow(Formula).to receive("[]").with("one").and_return(first_formula_dep)
162-
allow(Formula).to receive("[]").with("two").and_return(second_formula_dep)
160+
allow(Formulary).to receive(:resolve).with("zero").and_return(formula_with_deps)
161+
allow(Formulary).to receive(:resolve).with("one").and_return(first_formula_dep)
162+
allow(Formulary).to receive(:resolve).with("two").and_return(second_formula_dep)
163163
end
164164
end
165165

0 commit comments

Comments
 (0)