Created
September 4, 2013 17:34
-
-
Save mattheworiordan/6440162 to your computer and use it in GitHub Desktop.
Rerun RSpec tests after parallel_tests failure
This file contains 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
results = File.expand_path('../tmp/failing_specs.log', __FILE__) | |
if File.exists?(test_file) | |
tests = File.open(test_file).read.scan(/rspec .\/([^:]+:\d+)/) | |
if tests.present? | |
Dir.chdir(Rails.root) do | |
command = "bundle exec rspec #{tests.join(' ')}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Metthu, are you sure it works correctly ?
Because second line doesn't use result from first line ...
Best regards,
mIra