Sha256: 2c97ec90772c98c0bf54c5620a70e0d2fdc73378c4fc0b78a918c7056e3d68ae

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

require "petitest/texts/base_text"

module Petitest
  module Texts
    class FilteredBacktraceText < ::Petitest::Texts::BaseText
      # @return [Petitest::Test]
      attr_reader :test

      # @param test [Petitest::Test]
      def initialize(test:)
        @test = test
      end

      # @note Override
      def to_s
        colorize(test.runner.filtered_backtrace.join("\n").gsub(/^/, "# "), :detail)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
petitest-0.3.1 lib/petitest/texts/filtered_backtrace_text.rb
petitest-0.3.0 lib/petitest/texts/filtered_backtrace_text.rb