Class: RSpectacles::Formatter::Legacy::Base

Inherits:
RSpec::Core::Formatters::BaseFormatter
  • Object
show all
Defined in:
lib/rspectacles/formatter/legacy/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_) ⇒ Base

Returns a new instance of Base.



10
11
# File 'lib/rspectacles/formatter/legacy/base.rb', line 10

def initialize(_)
end

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



8
9
10
# File 'lib/rspectacles/formatter/legacy/base.rb', line 8

def output
  @output
end

Instance Method Details

#closeObject



43
44
# File 'lib/rspectacles/formatter/legacy/base.rb', line 43

def close
end

#example_failed(example) ⇒ Object



39
40
41
# File 'lib/rspectacles/formatter/legacy/base.rb', line 39

def example_failed(example)
  logger.log example
end

#example_passed(example) ⇒ Object



31
32
33
# File 'lib/rspectacles/formatter/legacy/base.rb', line 31

def example_passed(example)
  logger.log example
end

#example_pending(example) ⇒ Object



35
36
37
# File 'lib/rspectacles/formatter/legacy/base.rb', line 35

def example_pending(example)
  logger.log example
end

#example_started(example) ⇒ Object



28
29
# File 'lib/rspectacles/formatter/legacy/base.rb', line 28

def example_started(example)
end

#loggerObject



13
14
15
# File 'lib/rspectacles/formatter/legacy/base.rb', line 13

def logger
  @logger ||= RSpectacles::Adapter::Logger.new
end

#message(_message) ⇒ Object



17
18
# File 'lib/rspectacles/formatter/legacy/base.rb', line 17

def message(_message)
end

#start(_example_count) ⇒ Object



20
21
22
# File 'lib/rspectacles/formatter/legacy/base.rb', line 20

def start(_example_count)
  logger.start
end

#stopObject



24
25
26
# File 'lib/rspectacles/formatter/legacy/base.rb', line 24

def stop
  logger.stop
end