Created
January 19, 2012 16:48
-
-
Save jspillers/1641113 to your computer and use it in GitHub Desktop.
run specs multiple times with truncated output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
ARGV[0].to_i.times do |i| | |
puts "run #{i+1}" | |
result = `rake SPEC=#{ARGV[1]}` | |
puts result.match(/(Finished in \d+.\d+ seconds)/)[1] | |
puts result.match(/(\d+ examples, \d+ failures?)/)[1] | |
if result.match(/Failed examples:/) | |
puts '' | |
puts 'Failed examples:' | |
puts result.split('Failed examples:').last | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment