Permalink
Browse files

Enable :task_has_failed

  • Loading branch information...
netzpirat committed Oct 1, 2011
1 parent 0fe1061 commit bce6c91690b523d69ad0e86bc03f3f02c5b5a6b1
Showing with 6 additions and 6 deletions.
  1. +1 −1 lib/guard/coffeescript.rb
  2. +5 −5 spec/guard/coffeescript_spec.rb
@@ -70,7 +70,7 @@ def run_on_change(paths)
changed_files, success = Runner.run(Inspector.clean(paths), watchers, options)
notify changed_files
- #throw :task_has_failed unless success
+ throw :task_has_failed unless success
end
# Called on file(s) deletions that the Guard watches.
@@ -125,11 +125,11 @@
end
describe '#run_on_change' do
- #it 'throws :task_has_failed when an error occurs' do
- # inspector.should_receive(:clean).with(['a.coffee', 'b.coffee']).and_return ['a.coffee']
- # runner.should_receive(:run).with(['a.coffee'], [], defaults).and_return [[], false]
- # expect { guard.run_on_change(['a.coffee', 'b.coffee']) }.to throw_symbol :task_has_failed
- #end
+ it 'throws :task_has_failed when an error occurs' do
+ inspector.should_receive(:clean).with(['a.coffee', 'b.coffee']).and_return ['a.coffee']
+ runner.should_receive(:run).with(['a.coffee'], [], defaults).and_return [[], false]
+ expect { guard.run_on_change(['a.coffee', 'b.coffee']) }.to throw_symbol :task_has_failed
+ end
it 'starts the Runner with the cleaned files' do
inspector.should_receive(:clean).with(['a.coffee', 'b.coffee']).and_return ['a.coffee']

0 comments on commit bce6c91

Please sign in to comment.