Skip to content

Commit

Permalink
spec/runner: revert to failure by default
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Jan 30, 2014
1 parent 20f2051 commit c2cd547
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spec/runner.rb
Expand Up @@ -96,11 +96,15 @@
print "\r#{totals} in #{duration}"

# no failures, happy times
unless totals =~ / 0 failures/
exit 1
if totals =~ / 0 failures/
exit 0
end
rescue Selenium::WebDriver::Error::TimeOutError
print "\rThe specs have timed out."
if element = browser['rspec-error'] rescue nil
print "\r#{element.text}"
else
print "\rThe specs have timed out."
end
ensure
# take a screenshot and upload it to imgur
begin
Expand All @@ -116,3 +120,5 @@
puts
end
end

exit 1

0 comments on commit c2cd547

Please sign in to comment.