Rescue Interrupt on run yield

This commit is contained in:
Thibaud Guillaume-Gentil 2010-10-20 22:40:44 +02:00
parent f08a1025c2
commit 2191bc1088
2 changed files with 5 additions and 2 deletions

View File

@ -63,7 +63,10 @@ module Guard
def run
listener.stop
UI.clear if options[:clear]
begin
yield
rescue Interrupt
end
listener.start
end

View File

@ -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