class SpecdocFormatter
Public Instance Methods
after(state)
click to toggle source
Callback for the MSpec :after event. Prints a newline to finish the description string output.
# File lib/mspec/runner/formatters/specdoc.rb, line 38 def after(state) print "\n" end
before(state)
click to toggle source
Callback for the MSpec :before event. Prints the
it
block string.
Calls superclass method
DottedFormatter#before
# File lib/mspec/runner/formatters/specdoc.rb, line 18 def before(state) super print "- #{state.it}" end
enter(describe)
click to toggle source
Callback for the MSpec :enter event. Prints the
describe
block string.
# File lib/mspec/runner/formatters/specdoc.rb, line 12 def enter(describe) print "\n#{describe}\n" end
exception(exception)
click to toggle source
Callback for the MSpec :exception event. Prints
either 'ERROR - X' or 'FAILED - X' where X is the
sequential number of the exception raised. If there has already been an
exception raised while evaluating this example, it prints another
it
block description string so that each discription string
has an associated 'ERROR' or 'FAILED'
Calls superclass method
DottedFormatter#exception
# File lib/mspec/runner/formatters/specdoc.rb, line 30 def exception(exception) print "\n- #{exception.it}" if exception? super print " (#{exception.failure? ? 'FAILED' : 'ERROR'} - #{@count})" end
register()
click to toggle source
Calls superclass method
DottedFormatter#register
# File lib/mspec/runner/formatters/specdoc.rb, line 5 def register super MSpec.register :enter, self end