Sha256: b95d08cbd1daa16fa004cf914f519ec72479d8ab85ef245e839029c28a7855b7

Contents?: true

Size: 454 Bytes

Versions: 2

Compression:

Stored size: 454 Bytes

Contents

# frozen_string_literal: true

require 'rspec_table_formatter/version'
require_relative './table_builder'

# main class for formatter
class RspecTableFormatter
  class Error < StandardError; end

  RSpec::Core::Formatters.register self, :dump_summary

  def initialize(output)
    @output = output
  end

  def dump_summary(notification)
    examples = notification.examples
    @output << TableBuilder.new(examples).generate_table.to_s + "\n"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspec_table_formatter-0.1.10 lib/rspec_table_formatter.rb
rspec_table_formatter-0.1.9 lib/rspec_table_formatter.rb