1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fixed inconsistent require order for assertions and core_assertions

This commit is contained in:
Hiroshi SHIBATA 2021-09-10 20:41:52 +09:00
parent d7f0b41c7b
commit 151a1cd45e
Notes: git 2021-09-11 08:48:29 +09:00
5 changed files with 7 additions and 5 deletions

View file

@ -1046,6 +1046,7 @@ class TestModule < Test::Unit::TestCase
def test_attr_obsoleted_flag
c = Class.new do
extend Test::Unit::Assertions
extend Test::Unit::CoreAssertions
def initialize
@foo = :foo

View file

@ -25,9 +25,7 @@ module Test
module CoreAssertions
require_relative 'envutil'
require 'pp'
include Test::Unit::Assertions
def mu_pp(obj) #:nodoc:
obj.pretty_inspect.chomp

View file

@ -1,5 +1,4 @@
# frozen_string_literal: true
require_relative '../../core_assertions'
require 'pp'
module Test

View file

@ -1,5 +1,6 @@
# frozen_string_literal: true
require 'test/unit/assertions'
require_relative '../../core_assertions'
module Test
module Unit
@ -143,6 +144,9 @@ module Test
# See MiniTest::Assertions
class TestCase
include Assertions
include CoreAssertions
include LifecycleHooks
include Guard
extend Guard
@ -332,8 +336,6 @@ module Test
def teardown; end
include CoreAssertions
def on_parallel_worker?
false
end

View file

@ -36,6 +36,8 @@ module TestWEBrick
RubyBinArray << "-I" << "#{File.dirname(EnvUtil.rubybin)}/.ext/#{RUBY_PLATFORM}"
require "test/unit" unless defined?(Test::Unit)
include Test::Unit::Assertions
extend Test::Unit::Assertions
include Test::Unit::CoreAssertions
extend Test::Unit::CoreAssertions