diff --git a/lib/guard.rb b/lib/guard.rb index 94b81c3..4dfcc1f 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -63,7 +63,10 @@ module Guard def run listener.stop UI.clear if options[:clear] - yield + begin + yield + rescue Interrupt + end listener.start end diff --git a/spec/guard_spec.rb b/spec/guard_spec.rb index ab4863f..2c468b5 100644 --- a/spec/guard_spec.rb +++ b/spec/guard_spec.rb @@ -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