Class: Fried::Test::LoadTestsPath

Inherits:
Object
  • Object
show all
Defined in:
lib/fried/test/load_tests_path.rb

Overview

Puts tests path into $LOAD_PATH

Defined Under Namespace

Classes: Substitute

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLoadTestsPath

Returns a new instance of LoadTestsPath.



20
21
22
23
# File 'lib/fried/test/load_tests_path.rb', line 20

def initialize
  @get_test_directory = GetTestDirectory.new
  @prepend_to_load_path = PrependToLoadPath.new
end

Instance Attribute Details

#get_test_directoryObject

Returns the value of attribute get_test_directory.



17
18
19
# File 'lib/fried/test/load_tests_path.rb', line 17

def get_test_directory
  @get_test_directory
end

#prepend_to_load_pathObject

Returns the value of attribute prepend_to_load_path.



18
19
20
# File 'lib/fried/test/load_tests_path.rb', line 18

def prepend_to_load_path
  @prepend_to_load_path
end

Class Method Details

.buildObject



25
26
27
28
29
30
# File 'lib/fried/test/load_tests_path.rb', line 25

def self.build
  new.tap do |instance|
    instance.get_test_directory = GetTestDirectory.build
    instance.prepend_to_load_path = PrependToLoadPath.build
  end
end

.callObject



38
39
40
41
# File 'lib/fried/test/load_tests_path.rb', line 38

def self.call
  instance = build
  instance.()
end

Instance Method Details

#callObject

Parameters:

  • (void)


33
34
35
36
# File 'lib/fried/test/load_tests_path.rb', line 33

def call
  lib = get_test_directory.()
  prepend_to_load_path.(lib)
end