i've noticed couple specs failing intermittently depending on order they're run.
to isolate them i'm looking command can enter seed number , see specs listed line numbers in order determined seed number. possible? using --format=documentation did not provide info needed.
from there note list of tests run before intermittent failure each time occurs , narrow down culprit.
rspec's json formatter outputs filenames , line numbers in order run:
rspec --seed 1 -f json > out.json
to list of filenames line numbers resulting out.json
file:
require 'json' data = json.parse(file.read('out.json')) examples = data['examples'].map |example| "#{example['file_path']}:#{example['line_number']}" end
now examples
contain array of file paths like:
["./spec/models/user_spec.rb:19", "spec/models/user_spec.rb:29"]