Class: RspecRerun::Formatter

Inherits:
RSpec::Core::Formatters::ProgressFormatter
  • Object
show all
Defined in:
lib/rspec_rerun/formatter.rb

Instance Method Summary collapse

Instance Method Details

#dump_commands_to_rerun_failed_examplesObject



5
6
7
8
9
10
11
12
13
# File 'lib/rspec_rerun/formatter.rb', line 5

def dump_commands_to_rerun_failed_examples
  super

  File.open('.rspec-rerun', 'w') do |f|
    failed_examples.each do |example|
      f.write "#{RSpec::Core::Metadata::relative_path(example.location)} "
    end
  end
end