Class: Berl::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/berl/application.rb

Instance Method Summary collapse

Instance Method Details

#runObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/berl/application.rb', line 5

def run
  start = Time.now

  number_of_workers = ENV['PARALLELE_WORKERS'].to_s.to_i

  database_wizard = DatabaseWizard.new
  database_wizard.initialize_num_of_databases(number_of_workers)
  suites = SuitesResolver.resolve_suites

  behat_runner = BehatRunner.new(number_of_workers, suites, database_wizard.databases)
  behat_runner.start

  behat_runner.print_errors

  puts "Finished in #{Time.now - start} seconds"

  exit 1 if behat_runner.num_of_failed > 0
end