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



150
151
152
153
154
# File 'opal/lib/mspec/opal/runner.rb', line 150

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

Class Method Details

.main(formatter_class = BrowserFormatter) ⇒ Object



146
147
148
# File 'opal/lib/mspec/opal/runner.rb', line 146

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

Instance Method Details

#did_finishObject



171
172
173
# File 'opal/lib/mspec/opal/runner.rb', line 171

def did_finish
  MSpec.actions :finish
end

#registerObject



156
157
158
159
160
161
# File 'opal/lib/mspec/opal/runner.rb', line 156

def register
  formatter = @formatter_class.new
  formatter.register

  OSpecFilter.main.register
end

#runObject



163
164
165
# File 'opal/lib/mspec/opal/runner.rb', line 163

def run
  MSpec.opal_runner
end

#will_startObject



167
168
169
# File 'opal/lib/mspec/opal/runner.rb', line 167

def will_start
  MSpec.actions :start
end