/usr/lib/ruby/vendor_ruby/rspec/core/test_unit_assertions_adapter.rb is in ruby-rspec-core 3.5.0c3e0m0s0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | require 'test/unit/assertions'
module RSpec
module Core
# @private
module TestUnitAssertionsAdapter
include ::Test::Unit::Assertions
# If using test/unit from Ruby core with Ruby 1.9+, it includes
# MiniTest::Assertions by default. Note the upcasing of 'Test'.
#
# If the test/unit gem is being loaded, it will not include any minitest
# assertions.
#
# Only if Minitest 5.x is included / loaded do we need to worry about
# adding a shim for the new updates. Thus instead of checking on the
# RUBY_VERSION we need to check ancestors.
begin
# MiniTest is 4.x.
# Minitest is 5.x.
if ancestors.include?(::Minitest::Assertions)
require 'rspec/core/minitest_assertions_adapter'
include ::RSpec::Core::MinitestAssertionsAdapter
end
rescue NameError
# No-op. Minitest 5.x was not loaded.
end
end
end
end
|