Module: ActiveSpec

Defined in:
lib/active_spec.rb,
lib/active_spec/specifications.rb

Defined Under Namespace

Modules: Context, Satisfies, Specifications Classes: Base

Class Method Summary collapse

Class Method Details

.preload_specifications(path_to_specs) ⇒ Object

Globs the given path for files with the name *_specification.rb and requires any files that it finds.



8
9
10
11
12
# File 'lib/active_spec.rb', line 8

def self.preload_specifications(path_to_specs)
  Dir.glob("#{path_to_specs}/*_specification.rb").each do |f|
    require "#{path_to_specs}/#{File.basename(f, ".rb")}"
  end
end