Method: RSpec::Core::Example#location_rerun_argument

Defined in:
lib/rspec/core/example.rb

#location_rerun_argumentvoid

Returns the location-based argument that can be passed to the rspec command to rerun this example.

[View source]

96
97
98
99
100
101
102
103
104
# File 'lib/rspec/core/example.rb', line 96

def location_rerun_argument
  @location_rerun_argument ||= begin
    loaded_spec_files = RSpec.configuration.loaded_spec_files

    Metadata.ascending() do |meta|
      break meta[:location] if loaded_spec_files.include?(meta[:absolute_file_path])
    end
  end
end