Sha256: aaeda18387e3552adbf21e824729798ce5859771bc801996f9f9241cccf7b5cc

Contents?: true

Size: 1.23 KB

Versions: 7

Compression:

Stored size: 1.23 KB

Contents

# :stopdoc:

unless defined?(Minitest) then
  # all of this crap is just to avoid circular requires and is only
  # needed if a user requires "minitest/unit" directly instead of
  # "minitest/autorun", so we also warn

  from = caller.reject { |s| s =~ /rubygems/ }.join("\n  ")
  warn "Warning: you should require 'minitest/autorun' instead."
  warn %(Warning: or add 'gem "minitest"' before 'require "minitest/autorun"')
  warn "From:\n  #{from}"

  module Minitest; end
  MiniTest = Minitest # prevents minitest.rb from requiring back to us
  require "minitest"
end

MiniTest = Minitest unless defined?(MiniTest)

module Minitest
  class Unit
    VERSION = Minitest::VERSION
    class TestCase < Minitest::Test
      def self.inherited klass # :nodoc:
        from = caller.first
        warn "MiniTest::Unit::TestCase is now Minitest::Test. From #{from}"
        super
      end
    end

    def self.autorun # :nodoc:
      from = caller.first
      warn "MiniTest::Unit.autorun is now Minitest.autorun. From #{from}"
      Minitest.autorun
    end

    def self.after_tests(&b) # :nodoc:
      from = caller.first
      warn "MiniTest::Unit.after_tests is now Minitest.after_run. From #{from}"
      Minitest.after_run(&b)
    end
  end
end

# :startdoc:

Version data entries

7 entries across 7 versions & 5 rubygems

Version Path
mercadopago-custom-checkout-0.1.2 .gs/gems/minitest-5.9.0/lib/minitest/unit.rb
mercadopago-custom-checkout-0.1.1 .gs/gems/minitest-5.9.0/lib/minitest/unit.rb
abaci-0.3.0 vendor/bundle/gems/minitest-5.9.0/lib/minitest/unit.rb
second_step-0.1.2 secondstep-notify-1.0.0-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/minitest-5.9.1/lib/minitest/unit.rb
minitest-5.9.1 lib/minitest/unit.rb
windows-pr-1.2.5 vendor/bundle/ruby/2.2.0/gems/minitest-5.9.0/lib/minitest/unit.rb
minitest-5.9.0 lib/minitest/unit.rb