Skip to content
Snippets Groups Projects
Unverified Commit f0048807 authored by Masataka Pocke Kuwabara's avatar Masataka Pocke Kuwabara
Browse files

Add spec for cleanup process

parent 98a4868a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -82,6 +82,20 @@ RSpec.describe Guard::Commander do
Guard.start
end
end
context "when listener.start raises an error" do
it "calls Commander#stop" do
allow(listener).to receive(:start).and_raise(RuntimeError)
# From stop()
expect(interactor).to receive(:background)
expect(listener).to receive(:stop)
expect(runner).to receive(:run).with(:stop)
expect(Guard::UI).to receive(:info).with("Bye bye...", reset: true)
expect { Guard.start }.to raise_error(RuntimeError)
end
end
end
 
describe ".stop" do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment