Sha256: 1e4bdd9cbbe70a30e6d29fed48ca20cad0a02f098203872a2aff51467405abfa

Contents?: true

Size: 1.23 KB

Versions: 178

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

178 entries across 127 versions & 37 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/minitest-5.15.0/lib/minitest/unit.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/minitest-5.15.0/lib/minitest/unit.rb
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/minitest-5.15.0/lib/minitest/unit.rb
plaid-14.13.0 vendor/bundle/ruby/3.0.0/gems/minitest-5.14.2/lib/minitest/unit.rb
plaid-14.12.1 vendor/bundle/ruby/3.0.0/gems/minitest-5.14.2/lib/minitest/unit.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/minitest-5.11.3/lib/minitest/unit.rb
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/minitest-5.15.0/lib/minitest/unit.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/minitest-5.15.0/lib/minitest/unit.rb
plaid-14.12.0 vendor/bundle/ruby/2.6.0/gems/minitest-5.14.2/lib/minitest/unit.rb
plaid-14.11.1 vendor/bundle/ruby/2.6.0/gems/minitest-5.14.2/lib/minitest/unit.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/minitest-5.15.0/lib/minitest/unit.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/minitest-5.15.0/lib/minitest/unit.rb
minitest-5.15.0 lib/minitest/unit.rb
plaid-14.10.0 vendor/bundle/ruby/2.6.0/gems/minitest-5.14.2/lib/minitest/unit.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/minitest-5.14.4/lib/minitest/unit.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/minitest-5.14.4/lib/minitest/unit.rb
plaid-14.7.0 vendor/bundle/ruby/2.6.0/gems/minitest-5.14.2/lib/minitest/unit.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/minitest-5.14.4/lib/minitest/unit.rb
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/minitest-5.14.4/lib/minitest/unit.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/minitest-5.14.4/lib/minitest/unit.rb