Module: Filewatcher::SpecHelper::WatchRun::ClassMethods

Defined in:
lib/filewatcher/spec_helper/watch_run.rb

Overview

Class methods for this and inherited modules

Instance Method Summary collapse

Instance Method Details

#transform_spec_files(file) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/filewatcher/spec_helper/watch_run.rb', line 21

def transform_spec_files(file)
  tmp_files_dir = File.join(Dir.getwd, TMP_FILES_DIR)

  return tmp_files_dir if file.to_s.empty?

  return file if file.match?(%r{^(/|~|[A-Z]:)})

  File.join(tmp_files_dir, file)
end