Module: Retest::Runners::CachedTestFile

Included in:
TestRunner, VariableRunner
Defined in:
lib/retest/runners/cached_test_file.rb

Instance Method Summary collapse

Instance Method Details

#cached_test_fileObject



4
5
6
# File 'lib/retest/runners/cached_test_file.rb', line 4

def cached_test_file
  @cached_test_file
end

#cached_test_file=(value) ⇒ Object



8
9
10
# File 'lib/retest/runners/cached_test_file.rb', line 8

def cached_test_file=(value)
  @cached_test_file = value || @cached_test_file
end

#purge_test_file(purged) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/retest/runners/cached_test_file.rb', line 12

def purge_test_file(purged)
  return if purged.empty?

  if purged.is_a?(Array) && purged.include?(cached_test_file)
    @cached_test_file = nil
  elsif purged.is_a?(String) && purged == cached_test_file
    @cached_test_file = nil
  end
end