Rescue Interrupt on run yield
This commit is contained in:
parent
f08a1025c2
commit
2191bc1088
@ -63,7 +63,10 @@ module Guard
|
||||
def run
|
||||
listener.stop
|
||||
UI.clear if options[:clear]
|
||||
yield
|
||||
begin
|
||||
yield
|
||||
rescue Interrupt
|
||||
end
|
||||
listener.start
|
||||
end
|
||||
|
||||
|
@ -12,7 +12,7 @@ describe Guard do
|
||||
|
||||
describe "locate_guard" do
|
||||
|
||||
it "should return guard-rspec pat" do
|
||||
it "should return guard-rspec gem path" do
|
||||
Guard.locate_guard('rspec').should match(/^.*\/guard-rspec-.*$/)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user