Class: RspecFileChef::FileChef

Inherits:
Object
  • Object
show all
Extended by:
Dry::Configurable
Includes:
DirInitializer, StateKeeper
Defined in:
lib/rspec_file_chef/file_chef.rb

Constant Summary

Constants included from DirInitializer

DirInitializer::HELPER_PATH

Instance Attribute Summary

Attributes included from StateKeeper

#path_table, #tracking_files

Attributes included from DirInitializer

#rspec_path, #test_dir, #tmp_dir

Instance Method Summary collapse

Methods included from StateKeeper

#test_files

Constructor Details

#initialize(*tracking_files) ⇒ FileChef

Returns a new instance of FileChef.



11
12
13
14
15
16
17
# File 'lib/rspec_file_chef/file_chef.rb', line 11

def initialize(*tracking_files)
  @tracking_files = tracking_files
  @path_table = {}
  check_tracking_files
  set_rspec_path
  set_dir_paths
end

Instance Method Details

#clearObject



26
27
28
29
30
# File 'lib/rspec_file_chef/file_chef.rb', line 26

def clear
  delete_test_files
  restore_tracking_files
  delete_nonexistent_dirs
end

#makeObject



19
20
21
22
23
24
# File 'lib/rspec_file_chef/file_chef.rb', line 19

def make
  create_path_table
  move_to_tmp_dir
  create_nonexistent_dirs
  copy_from_test_dir
end