From bfd19f91708abf0564a482377c5107b30b934437 Mon Sep 17 00:00:00 2001 From: mansimarkaur Date: Fri, 23 Jun 2017 03:27:21 +0530 Subject: [PATCH] Stubbed nil:NilClass --- Library/Homebrew/test/language/node_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/test/language/node_spec.rb b/Library/Homebrew/test/language/node_spec.rb index 6021dd47da..4675bb60b6 100644 --- a/Library/Homebrew/test/language/node_spec.rb +++ b/Library/Homebrew/test/language/node_spec.rb @@ -31,7 +31,8 @@ describe Language::Node do it "does not raise error with a zero exitstatus" do allow(Utils).to receive(:popen_read).with("npm pack").and_return("pack") - allow($?).to receive(:exitstatus).and_return(0) + allow_any_instance_of(Process::Status).to receive(:exitstatus).and_return(0) + allow_any_instance_of(nil::NilClass).to receive(:exitstatus).and_return(0) resp = subject.std_npm_install_args(npm_install_arg) expect(resp).to include("--prefix=#{npm_install_arg}", "#{Dir.pwd}/pack") end