Class: Launcher

Inherits:
Object
  • Object
show all
Defined in:
lib/blindfold/launcher.rb

Constant Summary collapse

@@spec_opts_file =

these all leave beneath the config dir

'spec.opts'
@@blueprints_dir =
'blueprints'
@@matchers_dir =
'matchers'
@@helpers_dir =
'helpers'

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Launcher

Returns a new instance of Launcher.



13
14
15
16
17
# File 'lib/blindfold/launcher.rb', line 13

def initialize(args={})
  Blindfold.config_dir = args[:config_dir] if args.has_key?(:config_dir)
  Blindfold.rails_root = args[:rails_root] if args.has_key?(:rails_root)
  Blindfold.boot_redis = args[:boot_redis] if args.has_key?(:boot_redis)
end

Instance Method Details

#run(arguments) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/blindfold/launcher.rb', line 19

def run(arguments)
  start_redis if Blindfold.boot_redis
  init_rails if Blindfold.rails_root
  init_helpers
  init_blueprints
  init_matchers
  run_spec(arguments)
  stop_redis if Blindfold.boot_redis
end