Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

passing specs for watcher exception handling

  • Loading branch information...
commit 05e55545b79bcb53231df20a5ce0d579e6fb381c 1 parent 8e91b5f
@capotej capotej authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 spec/guard/watcher_spec.rb
View
9 spec/guard/watcher_spec.rb
@@ -143,8 +143,13 @@
context "with an exception that is raised" do
before(:all) { @guard.watchers = [Guard::Watcher.new('evil.rb', lambda { raise "EVIL" })] }
- it "displays the error" do
- Guard::UI.should_receive(:error).with("Problem with watch action!")
+ it "displays the error and backtrace" do
+ Guard::UI.should_receive(:error) { |msg|
+ msg.should include("Problem with watch action!")
+ msg.should include("EVIL")
+
+ }
+
Guard::Watcher.match_files(@guard, ['evil.rb'])
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.