Sha256: 32dcd9cf1d486a379e3aa511c47e432baf6cf3b6b2502de28a7952cb040548a0

Contents?: true

Size: 743 Bytes

Versions: 24

Compression:

Stored size: 743 Bytes

Contents

module Mocha
  module Detection
    module TestUnit
      def self.testcase
        if defined?(::Test::Unit::TestCase) &&
           !(defined?(::MiniTest::Unit::TestCase) && (::Test::Unit::TestCase < ::MiniTest::Unit::TestCase)) &&
           !(defined?(::MiniTest::Spec) && (::Test::Unit::TestCase < ::MiniTest::Spec))
          ::Test::Unit::TestCase
        end
      end

      def self.version
        version = '1.0.0'
        if testcase
          begin
            require 'test/unit/version'
          rescue LoadError # rubocop:disable Lint/HandleExceptions
          end
          if defined?(::Test::Unit::VERSION)
            version = ::Test::Unit::VERSION
          end
        end
        version
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
mocha-2.1.0 lib/mocha/detection/test_unit.rb
mocha-2.0.4 lib/mocha/detection/test_unit.rb
mocha-2.0.3 lib/mocha/detection/test_unit.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/mocha-2.0.2/lib/mocha/detection/test_unit.rb
mocha-2.0.2 lib/mocha/detection/test_unit.rb
mocha-1.16.1 lib/mocha/detection/test_unit.rb
mocha-1.15.1 lib/mocha/detection/test_unit.rb
mocha-2.0.1 lib/mocha/detection/test_unit.rb
mocha-2.0.0 lib/mocha/detection/test_unit.rb
mocha-1.16.0 lib/mocha/detection/test_unit.rb
mocha-2.0.0.alpha.1 lib/mocha/detection/test_unit.rb
mocha-2.0.0.alpha lib/mocha/detection/test_unit.rb
mocha-1.15.0 lib/mocha/detection/test_unit.rb
mocha-1.14.0 lib/mocha/detection/test_unit.rb
mocha-1.13.0 lib/mocha/detection/test_unit.rb
mocha-1.12.0 lib/mocha/detection/test_unit.rb
mocha-1.11.2 lib/mocha/detection/test_unit.rb
mocha-1.11.1 lib/mocha/detection/test_unit.rb
mocha-1.11.0 lib/mocha/detection/test_unit.rb
mocha-1.10.2 lib/mocha/detection/test_unit.rb