Sha256: 4cfc336d2b3d27cdeaf69141eec648a46afd898d1f288fb448ffde257d851cd9

Contents?: true

Size: 1.16 KB

Versions: 182

Compression:

Stored size: 1.16 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
        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

182 entries across 145 versions & 18 rubygems

Version Path
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/test-unit-3.6.2/lib/test/unit/ui/testrunner.rb
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/test-unit-3.6.2/lib/test/unit/ui/testrunner.rb
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/test-unit-3.6.2/lib/test/unit/ui/testrunner.rb
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/test-unit-3.6.2/lib/test/unit/ui/testrunner.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/test-unit-3.6.2/lib/test/unit/ui/testrunner.rb
test-unit-3.6.2 lib/test/unit/ui/testrunner.rb
postfinancecheckout-ruby-sdk-4.5.0 vendor/bundle/ruby/3.3.0/gems/test-unit-3.3.9/lib/test/unit/ui/testrunner.rb
wallee-ruby-sdk-4.5.0 vendor/bundle/ruby/3.3.0/gems/test-unit-3.3.9/lib/test/unit/ui/testrunner.rb
wallee-ruby-sdk-4.4.0 vendor/bundle/ruby/3.1.0/gems/test-unit-3.3.9/lib/test/unit/ui/testrunner.rb
postfinancecheckout-ruby-sdk-4.4.0 vendor/bundle/ruby/3.1.0/gems/test-unit-3.3.9/lib/test/unit/ui/testrunner.rb
postfinancecheckout-ruby-sdk-4.2.0 vendor/bundle/ruby/3.0.0/gems/test-unit-3.3.9/lib/test/unit/ui/testrunner.rb
wallee-ruby-sdk-4.2.0 vendor/bundle/ruby/3.0.0/gems/test-unit-3.3.9/lib/test/unit/ui/testrunner.rb
test-unit-3.6.1 lib/test/unit/ui/testrunner.rb
test-unit-3.6.0 lib/test/unit/ui/testrunner.rb
test-unit-3.5.9 lib/test/unit/ui/testrunner.rb
test-unit-3.5.8 lib/test/unit/ui/testrunner.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/test-unit-3.5.7/lib/test/unit/ui/testrunner.rb
postfinancecheckout-ruby-sdk-3.3.0 vendor/bundle/ruby/2.7.0/gems/test-unit-3.2.9/lib/test/unit/ui/testrunner.rb
wallee-ruby-sdk-3.3.0 vendor/bundle/ruby/2.7.0/gems/test-unit-3.2.9/lib/test/unit/ui/testrunner.rb
test-unit-3.5.7 lib/test/unit/ui/testrunner.rb