Class: Totes::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/totes/runner.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(specs) ⇒ Runner

Returns a new instance of Runner.



11
12
13
14
# File 'lib/totes/runner.rb', line 11

def initialize(specs)
  @specs = specs
  Totes::Reporter.inst.reset
end

Class Method Details

.specsObject



3
4
5
# File 'lib/totes/runner.rb', line 3

def self.specs
  @specs ||= []
end

.startObject



7
8
9
# File 'lib/totes/runner.rb', line 7

def self.start
  new(specs).run
end

Instance Method Details

#runObject



16
17
18
19
20
21
22
# File 'lib/totes/runner.rb', line 16

def run
  @specs.each { |spec| loop_through spec }
  Totes::Reporter.inst.summary
rescue StandardError => e
  Totes::Backtrace.filter e
  raise e
end