Class: OSpecRunner

Inherits:
Object show all
Defined in:
opal/lib/mspec/opal/runner.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(formatter_class) ⇒ OSpecRunner

Returns a new instance of OSpecRunner



209
210
211
212
213
# File 'opal/lib/mspec/opal/runner.rb', line 209

def initialize(formatter_class)
  @formatter_class = formatter_class
  register
  run
end

Class Method Details

.main(formatter_class = BrowserFormatter) ⇒ Object



205
206
207
# File 'opal/lib/mspec/opal/runner.rb', line 205

def self.main(formatter_class = BrowserFormatter)
  @main ||= self.new formatter_class
end

Instance Method Details

#did_finishObject



230
231
232
# File 'opal/lib/mspec/opal/runner.rb', line 230

def did_finish
  MSpec.actions :finish
end

#registerObject



215
216
217
218
219
220
# File 'opal/lib/mspec/opal/runner.rb', line 215

def register
  formatter = @formatter_class.new
  formatter.register

  OSpecFilter.main.register
end

#runObject



222
223
224
# File 'opal/lib/mspec/opal/runner.rb', line 222

def run
  MSpec.opal_runner
end

#will_startObject



226
227
228
# File 'opal/lib/mspec/opal/runner.rb', line 226

def will_start
  MSpec.actions :start
end