Stubbed nil:NilClass

This commit is contained in:
mansimarkaur 2017-06-23 03:27:21 +05:30
parent 5fed1f5cbe
commit bfd19f9170

View File

@ -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