class Rspeckled::Reporting::Outputs::Csv

Constants

FIELDS

Attributes

output[RW]

Public Class Methods

new() click to toggle source
# File lib/rspeckled/reporting/outputs/csv.rb, line 32
def initialize
  FileUtils.mkdir_p('log')

  self.output = CSV.open('log/rspec_report.csv', 'a').tap { |csv| csv << FIELDS }
end

Public Instance Methods

insert(data) click to toggle source
# File lib/rspeckled/reporting/outputs/csv.rb, line 38
def insert(data)
  output << FIELDS.map do |field|
    data.fetch(field.to_sym)
  end
end