test_ast.rb: no base directory name

* test/-ext-/ast/test_ast.rb: exclude base directory name from
  test method names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-01-17 06:38:08 +00:00
Родитель 640c3dbfa1
Коммит 2f5a20ce0d
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -112,18 +112,18 @@ class TestAst < Test::Unit::TestCase
SRCDIR = File.expand_path("../../../..", __FILE__) SRCDIR = File.expand_path("../../../..", __FILE__)
Dir.glob("#{SRCDIR}/test/**/*.rb").each do |path| Dir.glob("test/**/*.rb", base: SRCDIR).each do |path|
define_method("test_ranges:#{path}") do define_method("test_ranges:#{path}") do
helper = Helper.new(path) helper = Helper.new("#{SRCDIR}/#{path}")
helper.validate_range helper.validate_range
assert_equal([], helper.errors) assert_equal([], helper.errors)
end end
end end
Dir.glob("#{SRCDIR}/test/**/*.rb").each do |path| Dir.glob("test/**/*.rb", base: SRCDIR).each do |path|
define_method("test_not_cared:#{path}") do define_method("test_not_cared:#{path}") do
helper = Helper.new(path) helper = Helper.new("#{SRCDIR}/#{path}")
helper.validate_not_cared helper.validate_not_cared
assert_equal([], helper.errors) assert_equal([], helper.errors)