Sha256: 7777fbc743acc4936e1fb99a6371f3f0a6dc7a31e46aa4b46e9858928f8a11a7

Contents?: true

Size: 495 Bytes

Versions: 6

Compression:

Stored size: 495 Bytes

Contents

require "petitest/texts/base_text"

module Petitest
  module Texts
    class TestCasesResultMarginTopText < ::Petitest::Texts::BaseText
      # @return [Array<Petitest::TestCase>]
      attr_reader :test_cases

      # @param test_cases [Array<Petitest::TestCase>]
      def initialize(test_cases:)
        @test_cases = test_cases
      end

      # @note Override
      def to_s
        if test_cases.empty?
          "\n"
        else
          "\n\n"
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
petitest-0.2.1 lib/petitest/texts/test_cases_result_margin_top_text.rb
petitest-0.2.0 lib/petitest/texts/test_cases_result_margin_top_text.rb
petitest-0.1.3 lib/petitest/texts/test_cases_result_margin_top_text.rb
petitest-0.1.2 lib/petitest/texts/test_cases_result_margin_top_text.rb
petitest-0.1.1 lib/petitest/texts/test_cases_result_margin_top_text.rb
petitest-0.1.0 lib/petitest/texts/test_cases_result_margin_top_text.rb