Class: Fried::Test::LoadTestsPath
- Inherits:
-
Object
- Object
- Fried::Test::LoadTestsPath
- 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
-
#get_test_directory ⇒ Object
Returns the value of attribute get_test_directory.
-
#prepend_to_load_path ⇒ Object
Returns the value of attribute prepend_to_load_path.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize ⇒ LoadTestsPath
constructor
A new instance of LoadTestsPath.
Constructor Details
#initialize ⇒ LoadTestsPath
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_directory ⇒ Object
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_path ⇒ Object
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
.build ⇒ Object
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 |
.call ⇒ Object
38 39 40 41 |
# File 'lib/fried/test/load_tests_path.rb', line 38 def self.call instance = build instance.() end |
Instance Method Details
#call ⇒ Object
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 |