Sha256: 9b0e43a7a91961c60b57df26a57d07d3899681eb423b70e7197239b303319686

Contents?: true

Size: 1.24 KB

Versions: 61

Compression:

Stored size: 1.24 KB

Contents

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 # :nodoc:
  end
  MiniTest = Minitest # :nodoc: # prevents minitest.rb from requiring back to us
  require "minitest"
end

MiniTest = Minitest unless defined?(MiniTest)

module Minitest
  class Unit # :nodoc:
    VERSION = Minitest::VERSION
    class TestCase < Minitest::Test # :nodoc:
      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

Version data entries

61 entries across 50 versions & 14 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/minitest-5.24.1/lib/minitest/unit.rb
minitest-5.25.4 lib/minitest/unit.rb
minitest-5.25.3 lib/minitest/unit.rb
minitest-5.25.2 lib/minitest/unit.rb
direct7-0.0.18 vendor/bundle/ruby/2.7.0/gems/minitest-5.20.0/lib/minitest/unit.rb
direct7-0.0.18 vendor/bundle/ruby/3.0.0/gems/minitest-5.20.0/lib/minitest/unit.rb
direct7-0.0.17 vendor/bundle/ruby/2.7.0/gems/minitest-5.20.0/lib/minitest/unit.rb
direct7-0.0.17 vendor/bundle/ruby/3.0.0/gems/minitest-5.20.0/lib/minitest/unit.rb
direct7-0.0.16 vendor/bundle/ruby/3.0.0/gems/minitest-5.20.0/lib/minitest/unit.rb
direct7-0.0.16 vendor/bundle/ruby/2.7.0/gems/minitest-5.20.0/lib/minitest/unit.rb
minitest-5.25.1 lib/minitest/unit.rb
minitest-5.25.0 lib/minitest/unit.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/minitest-5.24.1/lib/minitest/unit.rb
minitest-5.24.1 lib/minitest/unit.rb
minitest-5.24.0 lib/minitest/unit.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/minitest-5.18.1/lib/minitest/unit.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/minitest-5.18.1/lib/minitest/unit.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/minitest-5.18.1/lib/minitest/unit.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/minitest-5.23.1/lib/minitest/unit.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/minitest-5.23.1/lib/minitest/unit.rb