Skip to content

Commit

Permalink
Fix Rake task exit codes (Fixes #39)
Browse files Browse the repository at this point in the history
  • Loading branch information
netzpirat committed Feb 20, 2012
1 parent 2b0ce00 commit ac4d953
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/guard/jasmine/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,19 @@ def initialize(name = :jasmine, options = '')
namespace :guard do
desc 'Run all Jasmine specs'
task(name) do
Guard::Jasmine::CLI.start(options.split)
begin
Guard::Jasmine::CLI.start(options.split)

rescue SystemExit => e
case e.status
when 0
ok 'All specs have passed'
when 1
fail 'Some specs have failed'
when 2
fail "The spec couldn't be run: #{ e.message }'"
end
end
end
end
end
Expand Down

0 comments on commit ac4d953

Please sign in to comment.