Sha256: 6da27a99f102cdcf2a522e22a3ad03aa1a7a244db2b708bd881653961d8332d1

Contents?: true

Size: 1.17 KB

Versions: 98

Compression:

Stored size: 1.17 KB

Contents

require 'test/unit/ui/testrunnerutilities'

module Test
  module Unit
    module UI
      class TestRunner
        extend TestRunnerUtilities

        attr_reader :listeners
        def initialize(suite, options={})
          if suite.respond_to?(:suite)
            @suite = suite.suite
          else
            @suite = suite
          end
          @options = options
          @listeners = @options[:listeners] || []
        end

        # Begins the test run.
        def start
          setup_mediator
          attach_to_mediator
          attach_listeners
          start_mediator
        end

        private
        def setup_mediator
          @mediator = TestRunnerMediator.new(@suite)
        end

        def attach_listeners
          @listeners.each do |listener|
            listener.attach_to_mediator(@mediator)
          end
        end

        def start_mediator
          @mediator.run_suite
        end

        def diff_target_string?(string)
          Assertions::AssertionMessage.diff_target_string?(string)
        end

        def prepare_for_diff(from, to)
          Assertions::AssertionMessage.prepare_for_diff(from, to)
        end
      end
    end
  end
end

Version data entries

98 entries across 91 versions & 8 rubygems

Version Path
rhodes-7.6.0 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-7.5.1 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-7.4.1 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-7.1.17 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-6.2.0 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-6.0.11 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-5.5.18 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-5.5.17 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-5.5.15 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-5.5.0.22 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-5.5.2 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-5.5.0.7 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-5.5.0.3 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
rhodes-5.5.0 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
tauplatform-1.0.3 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
tauplatform-1.0.2 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
tauplatform-1.0.1 spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/test-unit-2.4.8/lib/test/unit/ui/testrunner.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/test-unit-2.4.8/lib/test/unit/ui/testrunner.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/test-unit-2.4.8/lib/test/unit/ui/testrunner.rb