class MatrixFormatter::Formatters::BaseFormatter

Attributes

matrix[RW]

Public Class Methods

new(output) click to toggle source
Calls superclass method
# File lib/matrix_formatter/formatters/base_formatter.rb, line 8
def initialize(output)
  super(output)
  @matrix = matrix
end

Public Instance Methods

dump_summary(duration, example_count, failure_count, pending_count) click to toggle source
# File lib/matrix_formatter/formatters/base_formatter.rb, line 42
def dump_summary(duration, example_count, failure_count, pending_count)
  # don't
end
example_failed(example) click to toggle source
# File lib/matrix_formatter/formatters/base_formatter.rb, line 34
def example_failed(example)
  @matrix.add_result :failed
end
example_group_started(example_group) click to toggle source
# File lib/matrix_formatter/formatters/base_formatter.rb, line 17
def example_group_started(example_group)
  description = example_group.description
  if @matrix.implementors.include? description
    @matrix.current_implementor = description
  else
    @matrix.current_product = description
  end
end
example_passed(example) click to toggle source
# File lib/matrix_formatter/formatters/base_formatter.rb, line 30
def example_passed(example)
  @matrix.add_result :passed
end
example_pending(example) click to toggle source
# File lib/matrix_formatter/formatters/base_formatter.rb, line 38
def example_pending(example)
  @matrix.add_result :pending
end
example_started(example) click to toggle source
# File lib/matrix_formatter/formatters/base_formatter.rb, line 26
def example_started(example)
  @matrix.current_feature = example.description
end
start(expected_example_count) click to toggle source
# File lib/matrix_formatter/formatters/base_formatter.rb, line 13
def start(expected_example_count)
  @matrix ||= MatrixFormatter::FeatureMatrix.new
end