class Fried::Test::LoadTestFiles
Load test files using {require_relative}
Attributes
get_single_test_file[RW]
get_test_files[RW]
Public Class Methods
build()
click to toggle source
# File lib/fried/test/load_test_files.rb, line 26 def self.build new.tap do |instance| instance.get_test_files = GetTestFiles.build instance.get_single_test_file = GetSingleTestFile.build end end
call(options = Options::Default)
click to toggle source
# File lib/fried/test/load_test_files.rb, line 33 def self.call(options = Options::Default) instance = build instance.(options) end
new()
click to toggle source
# File lib/fried/test/load_test_files.rb, line 21 def initialize @get_test_files = GetTestFiles.new @get_single_test_file = GetSingleTestFile.new end
Public Instance Methods
call(options = Options::Default)
click to toggle source
@return [void]
# File lib/fried/test/load_test_files.rb, line 39 def call(options = Options::Default) test_files = fetch_files(options) test_files.each { |file| require_relative file.to_s } end
Private Instance Methods
fetch_files(options)
click to toggle source
# File lib/fried/test/load_test_files.rb, line 46 def fetch_files(options) if options.single_file? get_single_test_file.(options.file) else get_test_files.() end end