Sha256: eca931d18581ab16ea777a202bdca4caded5e3acc744a06399773df183a92378
Contents?: true
Size: 713 Bytes
Versions: 13
Compression:
Stored size: 713 Bytes
Contents
module Marty; module RSpec; module PostRunLogger class Storage def self.data @@data ||= [] end def self.test_number @@num ||= 0 @@num += 1 end def self.store_data(name, line) data << " #{test_number}) #{name}" data << Array(line).map { |string| " #{string}" } data << "" end def self.dump_data unless data.empty? puts "\n\nPost Run Logging:\n\n" puts data end end end def post_run_log(*log_string) Storage.store_data example.example_group.parent_groups.map(&:description). reverse.join(' ') + ' ' + example.description, log_string end end end end
Version data entries
13 entries across 13 versions & 1 rubygems