aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authormansimarkaur2017-06-19 01:18:38 +0530
committermansimarkaur2017-06-23 03:40:03 +0530
commit837ffa209c37966c95b2a8aa98c43df20e160075 (patch)
tree5b547f1decd7f90fb6d4c39884cc7b0588a20664 /Library
parent2cb678a6d52c53ed7dd017419ef9c2ab0114c3ce (diff)
downloadbrew-837ffa209c37966c95b2a8aa98c43df20e160075.tar.bz2
stubbed the node formula
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/language/node_spec.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Homebrew/test/language/node_spec.rb b/Library/Homebrew/test/language/node_spec.rb
index df29a1db9..4f2a0df09 100644
--- a/Library/Homebrew/test/language/node_spec.rb
+++ b/Library/Homebrew/test/language/node_spec.rb
@@ -7,10 +7,14 @@ describe Language::Node do
end
it "calls prepend_path when npmrc does not exist" do
- allow(Formula).to receive(:[]).with("node").and_return(formula { url "foo-1.0" })
+ node = formula "node" do
+ url "node-test"
+ end
+ stub_formula_loader(node)
allow_any_instance_of(Pathname).to receive(:exist?).and_return(false)
- allow(ENV).to receive(:prepend_path).with("PATH", Formula["node"].opt_libexec/"bin").and_return("prepend_path called")
- expect(subject.setup_npm_environment).to eq("prepend_path called")
+
+ subject.setup_npm_environment
+ expect(ENV["PATH"]).to include(Formula["node"].opt_libexec/"bin")
end
end