Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/guard/phpunit/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,16 @@ def run_tests(paths, options)
# return false in case the system call fails with no status!
return false if $?.nil?

if $?.success? or tests_contain_failures? or tests_contain_errors?
# capture success so that if notifications alter the status stored in $? we still return the correct value
success = $?.success?

if success or tests_contain_failures? or tests_contain_errors?
notify_results(output, options)
else
notify_failure(options)
end

$?.success?
success
end

# Displays the start testing notification.
Expand Down Expand Up @@ -194,4 +197,4 @@ def execute_command(command)
end
end
end
end
end