Sha256: e4a792e25cdd1354b9b16b252edd54aa84d2dadda68a1bcb2778925ad70860a2

Contents?: true

Size: 728 Bytes

Versions: 13

Compression:

Stored size: 728 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
        else
          nil
        end
      end

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

Version data entries

13 entries across 10 versions & 2 rubygems

Version Path
mocha-1.6.0 lib/mocha/detection/test_unit.rb
mocha-1.5.0 lib/mocha/detection/test_unit.rb
mocha-1.4.0 lib/mocha/detection/test_unit.rb
mocha-1.3.0 lib/mocha/detection/test_unit.rb
mocha-1.2.1 lib/mocha/detection/test_unit.rb
mocha-1.2.0 lib/mocha/detection/test_unit.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/mocha-1.0.0/lib/mocha/detection/test_unit.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/mocha-1.0.0/lib/mocha/detection/test_unit.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/mocha-1.0.0/lib/mocha/detection/test_unit.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/mocha-1.0.0/lib/mocha/detection/test_unit.rb
mocha-1.1.0 lib/mocha/detection/test_unit.rb
mocha-1.0.0 lib/mocha/detection/test_unit.rb
mocha-1.0.0.alpha lib/mocha/detection/test_unit.rb