<commit_before>module SteppingStone
  class TestCase
    attr_reader :sut, :actions, :result

    def initialize(sut, *actions)
      @sut = sut
      @actions = actions
      @result = :pending
    end

    def execute!
      if !actions.empty?
        sut.start_test_case(self)

        results = []
        actions.each do |action|
          result = sut.apply(action)
          results << result
          break unless result == :passed
        end

        sut.end_test_case(self)

        @result = results.last
      end
    end

    def passed?
      result == :passed
    end

    def failed?
      result == :failed
    end

    def pending?
      result == :pending
    end
  end
end<commit_msg>Simplify result reporting<commit_after>module SteppingStone
  class TestCase
    attr_reader :sut, :actions, :result

    def initialize(sut, *actions)
      @sut = sut
      @actions = actions
      @result = :pending
    end

    def execute!
      within_start_and_end do
        if !actions.empty?
          sut.start_test_case(self)

          results = []
          actions.each do |action|
            action_result = sut.apply(action)
            results << action_result
            break unless action_result == :passed
          end

          sut.end_test_case(self)

          @result = results.last
        end
      end
    end

    def passed?
      result == :passed
    end

    def failed?
      result == :failed
    end

    def pending?
      result == :pending
    end

    private

    def within_start_and_end(&block)
      block.call
    end
  end
end
{'fraction_non_alphanumeric': 0.07706885660138976, 'fraction_numerical': 0.0, 'mean_word_length': 1.7310344827586206, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5193328', 'n_tokens_mistral': 486, 'n_tokens_neox': 455, 'n_words': 125}