Sha256: 55df0b07d1f36117383ba009e172e9e29e8d14e125c47b606e7a9d8fed0cf421

Contents?: true

Size: 688 Bytes

Versions: 4

Compression:

Stored size: 688 Bytes

Contents

# frozen_string_literal: true

module AIRefactor
  module Tests
    class TestRunResult
      attr_reader :stdout, :stderr, :example_count, :failure_count, :pending_count

      def initialize(stdout, stderr, status, example_count, failure_count, pending_count, errored)
        @stdout = stdout
        @stderr = stderr
        @status = status
        @example_count = example_count
        @failure_count = failure_count
        @pending_count = pending_count
        @errored = errored
      end

      def failed?
        return true unless @status.success?
        @errored && @errored.to_i > 0
      end

      def exitstatus
        @status.exitstatus
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ai_refactor-0.3.1 lib/ai_refactor/refactors/tests/test_run_result.rb
ai_refactor-0.3.0 lib/ai_refactor/refactors/tests/test_run_result.rb
ai_refactor-0.2.0 lib/ai_refactor/refactors/tests/test_run_result.rb
ai_refactor-0.1.0 lib/ai_refactor/refactors/tests/test_run_result.rb