Top Level Namespace

Defined Under Namespace

Modules: Bacon, Kernel, Motion, MotionSpec Classes: AppDelegate, FalseClass, Numeric, Object, Proc, TrueClass

Instance Method Summary collapse

Instance Method Details

#expanded_file_path(file) ⇒ Object



22
23
24
# File 'lib/motion-spec.rb', line 22

def expanded_file_path(file)
  File.expand_path("../motion-spec/#{file}.rb", __FILE__)
end

#require_lib_files(files) ⇒ Object

Proper load order of all the classes/modules



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/motion-spec.rb', line 10

def require_lib_files(files)
  case files
  when String
    file_paths = expanded_file_path(files)
    file_paths = Dir.glob(file_paths) if files.include? '*'
  when Array
    file_paths = files.map { |f| expanded_file_path(f) }
  end

  Motion::Require.all(file_paths)
end