class RSpectacles::Formatter::Base

Attributes

output[R]

Public Class Methods

new(_) click to toggle source
# File lib/rspectacles/formatter/base.rb, line 15
def initialize(_)
end

Public Instance Methods

config() click to toggle source
# File lib/rspectacles/formatter/base.rb, line 49
def config
  RSpectacles.config
end
current_run_key() click to toggle source
# File lib/rspectacles/formatter/base.rb, line 45
def current_run_key
  ENV['CURRENT_RSPEC_RUN'] || config.last_run_primary_key
end
example_failed(notification) click to toggle source
# File lib/rspectacles/formatter/base.rb, line 41
def example_failed(notification)
  logger.log notification.example
end
example_passed(notification) click to toggle source
# File lib/rspectacles/formatter/base.rb, line 33
def example_passed(notification)
  logger.log notification.example
end
example_pending(notification) click to toggle source
# File lib/rspectacles/formatter/base.rb, line 37
def example_pending(notification)
  logger.log notification.example
end
logger() click to toggle source
# File lib/rspectacles/formatter/base.rb, line 18
def logger
  @logger ||= RSpectacles::Adapter::Logger.new(test_run_key: current_run_key)
end
message(_notification) click to toggle source
# File lib/rspectacles/formatter/base.rb, line 22
def message(_notification)
end
start(_) click to toggle source
# File lib/rspectacles/formatter/base.rb, line 25
def start(_)
  logger.start
end
stop(_) click to toggle source
# File lib/rspectacles/formatter/base.rb, line 29
def stop(_)
  logger.stop
end