Sha256: e2ef0e6ea0da473aa9517eba2e404f3d5b41948f5c0564d4c455658849e4d47d

Contents?: true

Size: 778 Bytes

Versions: 15

Compression:

Stored size: 778 Bytes

Contents

module DeepTest
  module Test
    class WorkResult < ::Test::Unit::TestResult
      attr_reader :identifier
      attr_accessor :output

      def initialize(identifier)
        super()
        @identifier = identifier
      end

      def add_to(result)
        @failures.each {|e| result.add_failure(e)}

        @errors.each do |e| 
          e.resolve_marshallable_exception
          result.add_error(e)
        end

        assertion_count.times {result.add_assertion}
        run_count.times {result.add_run}
      end

      def add_error(error)
        error.make_exception_marshallable
        super(error)
      end
      
      def failed_due_to_deadlock?
        @errors.any? && DeepTest::DeadlockDetector.due_to_deadlock?(@errors.last)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
jason-o-matic-deep_test-1.2.2.1 lib/deep_test/test/work_result.rb
jason-o-matic-deep_test-1.2.2.2 lib/deep_test/test/work_result.rb
jason-o-matic-deep_test-1.2.2.3 lib/deep_test/test/work_result.rb
jason-o-matic-deep_test-1.2.2.4 lib/deep_test/test/work_result.rb
jason-o-matic-deep_test-1.2.2.5 lib/deep_test/test/work_result.rb
jason-o-matic-deep_test-1.2.2.6 lib/deep_test/test/work_result.rb
jperkins-deep_test-1.2.2 lib/deep_test/test/work_result.rb
jstorimer-deep-test-1.4.0 lib/deep_test/test/work_result.rb
jstorimer-deep-test-1.3.0 lib/deep_test/test/work_result.rb
jstorimer-deep-test-1.2.0 lib/deep_test/test/work_result.rb
jstorimer-deep-test-1.1.0 lib/deep_test/test/work_result.rb
jstorimer-deep-test-1.0.0 lib/deep_test/test/work_result.rb
deep_test-1.2.1 lib/deep_test/test/work_result.rb
deep_test-1.2.0 lib/deep_test/test/work_result.rb
deep_test-1.2.2 lib/deep_test/test/work_result.rb