lib/petitest/texts/failures_text.rb in petitest-0.2.1 vs lib/petitest/texts/failures_text.rb in petitest-0.3.0

- old
+ new

@@ -1,16 +1,16 @@ require "petitest/texts/base_text" module Petitest module Texts class FailuresText < ::Petitest::Texts::BaseText - # @return [Array<Petitest::TestCase>] - attr_reader :test_cases + # @return [Array<Petitest::Test>] + attr_reader :tests - # @param test_cases [Array<Petitest::TestCase>] - def initialize(test_cases:) - @test_cases = test_cases + # @param tests [Array<Petitest::Test>] + def initialize(tests:) + @tests = tests end # @note Override def to_s [ @@ -26,13 +26,13 @@ failures_element_texts.join("\n\n") end # @return [Array<Petitest::Textx::FailuresElementText>] def failures_element_texts - test_cases.map.with_index do |test_case, index| + tests.map.with_index do |test, index| ::Petitest::Texts::FailuresElementText.new( index: index, - test_case: test_case, + test: test, ) end end # @return [String]