Created
April 30, 2019 16:54
-
-
Save kyle-annen/4d833d38fe6581c5743a8ecad0b4a51c to your computer and use it in GitHub Desktop.
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 | |
file_with_failure = "spec/folder/flaky_spec.rb" | |
spec_files = Dir["spec/folder/**/*_spec.rb"] | |
.reject {|file| file == file_with_failure} | |
spec_files.each do |spec_file| | |
command = “rspec spec --order defined” | |
result = system("#{command} #{spec_file} #{file_with_failure}" | |
result = {outcome: outcome, first_file: spec_file} | |
File.open("tmp/spec_order.log", "a"){ |file| file.puts result } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment