Class: Specjour::RSpec::Preloader

Inherits:
Object
  • Object
show all
Defined in:
lib/specjour/rspec/preloader.rb

Class Method Summary collapse

Class Method Details

.load(paths = []) ⇒ Object



2
3
4
5
6
7
# File 'lib/specjour/rspec/preloader.rb', line 2

def self.load(paths=[])
  Specjour.benchmark("Loading RSpec environment") do
    require File.expand_path('spec/spec_helper', Dir.pwd)
    load_spec_files paths
  end
end

.load_spec_files(paths) ⇒ Object



9
10
11
12
13
14
# File 'lib/specjour/rspec/preloader.rb', line 9

def self.load_spec_files(paths)
  options = ::RSpec::Core::ConfigurationOptions.new(paths)
  options.parse_options
  options.configure ::RSpec.configuration
  ::RSpec.configuration.load_spec_files
end