Sha256: f3649643333fb67bc5c6248f62ab01280012d79e0d2c45054ceee07ba64ae22d

Contents?: true

Size: 838 Bytes

Versions: 10

Compression:

Stored size: 838 Bytes

Contents

require_relative "../../test_helper"

module MiniTestReportersTest
  class ReporterTest < TestCase
    def setup
      klass = Class.new do
        include MiniTest::Reporter
      end

      @reporter = klass.new
    end

    def test_callbacks
      [
        :before_suites, :after_suite, :before_suite, :after_suite, :before_test,
        :pass, :skip, :failure, :error
      ].each { |method| assert_respond_to @reporter, method }
    end

    def test_runner
      assert_kind_of MiniTest::Unit, @reporter.runner
    end

    def test_output
      assert_equal MiniTest::Unit.output, @reporter.output
    end

    def test_verbose
      refute @reporter.verbose?

      begin
        @reporter.runner.verbose = true
        assert @reporter.verbose?
      ensure
        @reporter.runner.verbose = false
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
minitest-reporters-0.14.5 test/unit/minitest/reporter_test.rb
minitest-reporters-0.14.4 test/unit/minitest/reporter_test.rb
minitest-reporters-0.14.3 test/unit/minitest/reporter_test.rb
minitest-reporters-0.14.2 test/unit/minitest/reporter_test.rb
minitest-reporters-0.14.1 test/unit/minitest/reporter_test.rb
minitest-reporters-0.14.0 test/unit/minitest/reporter_test.rb
minitest-reporters-0.13.1 test/unit/minitest/reporter_test.rb
minitest-reporters-0.13.0 test/unit/minitest/reporter_test.rb
minitest-reporters-0.12.2 test/unit/minitest/reporter_test.rb
minitest-reporters-0.12.1 test/unit/minitest/reporter_test.rb