Merge and_call_original instruction into expect() calls.
This commit is contained in:
parent
84ad387661
commit
7a108d3db0
@ -341,11 +341,11 @@ describe Cask::Artifact::App, :cask do
|
|||||||
contents_path = target_path.join("Contents")
|
contents_path = target_path.join("Contents")
|
||||||
|
|
||||||
expect(app.target).to receive(:writable?).at_least(:once).and_return false
|
expect(app.target).to receive(:writable?).at_least(:once).and_return false
|
||||||
allow(command).to receive(:run!).and_call_original
|
|
||||||
expect(command).to receive(:run!)
|
expect(command).to receive(:run!)
|
||||||
.with("/bin/cp", args: ["-pR", source_path.join("Contents"), target_path],
|
.with("/bin/cp", args: ["-pR", source_path.join("Contents"), target_path],
|
||||||
sudo: true)
|
sudo: true)
|
||||||
expect(command).to receive(:run!).with(any_args)
|
.and_call_original
|
||||||
|
expect(command).to receive(:run!).with(any_args).and_call_original
|
||||||
expect(FileUtils).not_to receive(:move).with(source_path.join("Contents"), contents_path)
|
expect(FileUtils).not_to receive(:move).with(source_path.join("Contents"), contents_path)
|
||||||
|
|
||||||
app.uninstall_phase(command: command, force: force, successor: cask)
|
app.uninstall_phase(command: command, force: force, successor: cask)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user