Class: Totes::Runner
- Inherits:
-
Object
- Object
- Totes::Runner
- Defined in:
- lib/totes/runner.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(specs) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
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
.specs ⇒ Object
3 4 5 |
# File 'lib/totes/runner.rb', line 3 def self.specs @specs ||= [] end |
.start ⇒ Object
7 8 9 |
# File 'lib/totes/runner.rb', line 7 def self.start new(specs).run end |
Instance Method Details
#run ⇒ Object
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 |