Sha256: 53576a6e494cc45bb0367893cf391d59537634c4f992425271182356d416f3b5

Contents?: true

Size: 712 Bytes

Versions: 51

Compression:

Stored size: 712 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

51 entries across 51 versions & 1 rubygems

Version Path
marty-14.3.0 spec/support/post_run_logger.rb
marty-14.0.0 spec/support/post_run_logger.rb
marty-13.0.2 spec/support/post_run_logger.rb
marty-11.0.0 spec/support/post_run_logger.rb
marty-10.0.3 spec/support/post_run_logger.rb
marty-10.0.2 spec/support/post_run_logger.rb
marty-10.0.0 spec/support/post_run_logger.rb
marty-9.5.1 spec/support/post_run_logger.rb
marty-9.5.0 spec/support/post_run_logger.rb
marty-9.3.3 spec/support/post_run_logger.rb
marty-9.3.2 spec/support/post_run_logger.rb
marty-9.3.0 spec/support/post_run_logger.rb
marty-8.5.0 spec/support/post_run_logger.rb
marty-8.4.1 spec/support/post_run_logger.rb
marty-8.3.1 spec/support/post_run_logger.rb
marty-8.2.0 spec/support/post_run_logger.rb
marty-8.0.0 spec/support/post_run_logger.rb
marty-6.1.0 spec/support/post_run_logger.rb
marty-5.2.0 spec/support/post_run_logger.rb
marty-5.1.4 spec/support/post_run_logger.rb