Class: Rspec::Axlsx::FormatterRSpec3

Inherits:
RSpec::Core::Formatters::BaseFormatter
  • Object
show all
Defined in:
lib/rspec/axlsx/formatter_rspec3.rb

Overview

class Formatter < ::RSpec::Core::Formatters::BaseFormatter

Instance Method Summary collapse

Constructor Details

#initializeFormatterRSpec3

Returns a new instance of FormatterRSpec3.



13
14
15
16
# File 'lib/rspec/axlsx/formatter_rspec3.rb', line 13

def initialize(*)
  @example_groups = []
  @core = Rspec::Axlsx::Formatter::Core.new
end

Instance Method Details

#example_failed(notification) ⇒ Object



26
27
28
# File 'lib/rspec/axlsx/formatter_rspec3.rb', line 26

def example_failed(notification)
  @example_groups.push(notification.example)
end

#example_group_started(notification) ⇒ Object



18
19
20
# File 'lib/rspec/axlsx/formatter_rspec3.rb', line 18

def example_group_started(notification)
  @example_groups.push(notification.group)
end

#example_passed(notification) ⇒ Object



22
23
24
# File 'lib/rspec/axlsx/formatter_rspec3.rb', line 22

def example_passed(notification)
  @example_groups.push(notification.example)
end

#stop(notification) ⇒ Object



30
31
32
# File 'lib/rspec/axlsx/formatter_rspec3.rb', line 30

def stop(notification)
  @core.to_sheet(@example_groups)
end