class RSpecSearchAndDestroy::LocationSource

Public Instance Methods

enabled?() click to toggle source
# File lib/rspec-search-and-destroy/location_source.rb, line 3
def enabled?
  filename && File.exist?(filename)
end
example_locations_to_run() click to toggle source
# File lib/rspec-search-and-destroy/location_source.rb, line 7
def example_locations_to_run
  raise "LocationSource is not currently enabled" unless enabled?

  File.open(filename, 'rb') do |f|
    Marshal.load(f)
  end
end

Private Instance Methods

filename() click to toggle source
# File lib/rspec-search-and-destroy/location_source.rb, line 17
def filename
  ENV['RSPEC_SAD_EXAMPLES']
end