Skip to content

Instantly share code, notes, and snippets.

@mattheworiordan
Created September 4, 2013 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattheworiordan/6440162 to your computer and use it in GitHub Desktop.
Save mattheworiordan/6440162 to your computer and use it in GitHub Desktop.
Rerun RSpec tests after parallel_tests failure
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
@xjenkins
Copy link

Hello Metthu, are you sure it works correctly ?
Because second line doesn't use result from first line ...
Best regards,
mIra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment