spec/unit/berkshelf/locations/git_spec.rb in berkshelf-6.0.1 vs spec/unit/berkshelf/locations/git_spec.rb in berkshelf-6.1.0
- old
+ new
@@ -238,11 +238,11 @@
allow(Berkshelf).to receive(:which).and_return(false)
expect { subject.git("foo") }.to raise_error(GitNotInstalled)
end
it "raises an error if the command fails" do
- shell_out = double("shell_out", success?: false, stderr: nil)
- allow(Buff::ShellOut).to receive(:shell_out).and_return(shell_out)
+ shell_out = double("shell_out", error?: true, stderr: nil)
+ allow(subject).to receive(:shell_out).and_return(shell_out)
expect { subject.git("foo") }.to raise_error(GitCommandError)
end
end
end
end