1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/mkmf/test_mkmf.rb
Jeremy Evans ab3cb29bd9 Avoid defining the same test class in multiple files
Should fix issues with parallel testing sometimes not running all
tests.

This should be viewed skipping whitespace changes.

Fixes [Bug #18731]
2022-04-22 15:00:16 -07:00

13 lines
351 B
Ruby

# frozen_string_literal: false
require 'test/unit'
require 'mkmf'
class TestMkmfGlobal < Test::Unit::TestCase
main = TOPLEVEL_BINDING.receiver
MakeMakefile.public_instance_methods(false).each do |m|
define_method(:"test_global_#{m}") do
assert_respond_to(main, [m, true])
assert_not_respond_to(main, [m, false])
end
end
end