Skip to content

Commit a66f3e3

Browse files
committed
add specs for install error
1 parent 781da70 commit a66f3e3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#<RuntimeError: Failed running command:
2+
nb`sudo cp source target`>

spec/completely/commands/install_spec.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,15 @@
4141
.to output_approval('cli/install/dry')
4242
end
4343
end
44+
45+
context 'when the installer fails' do
46+
it 'raises an error' do
47+
allow(subject).to receive(:installer).and_return(mock_installer)
48+
49+
expect(mock_installer).to receive(:install).and_return false
50+
51+
expect { subject.execute %w[install completely-test] }
52+
.to raise_approval('cli/install/install-error')
53+
end
54+
end
4455
end

0 commit comments

Comments
 (0)