Class: ChemistryKit::CLI::CKitCLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/chemistrykit/cli/cli.rb

Overview

Main Chemistry Kit CLI Class

Instance Method Summary collapse

Instance Method Details

#brewObject



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/chemistrykit/cli/cli.rb', line 43

def brew
  config = load_config options['config']
  # TODO perhaps the params should be rolled into the available
  # config object injected into the system?
  pass_params if options['params']
  turn_stdout_stderr_on_off
  set_logs_dir
  load_page_objects
  setup_tags
  # configure rspec
  rspec_config(config)
  # get those beakers that should be executed
  beakers = options['beakers'] ? options['beakers'] : Dir.glob(File.join(Dir.getwd, 'beakers/*'))
  # based on concurrency parameter run tests
  if config.concurrency > 1 && ! options['parallel']
    run_in_parallel beakers, config.concurrency
  else
    run_rspec beakers
  end
end