Skip to content

Instantly share code, notes, and snippets.

@mattheworiordan
Created September 4, 2013 17:34
Show Gist options
  • Select an option

  • Save mattheworiordan/6440162 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

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