ruby-changes:49766
From: nobu <ko1@a...>
Date: Wed, 17 Jan 2018 15:38:13 +0900 (JST)
Subject: [ruby-changes:49766] nobu:r61884 (trunk): test_ast.rb: no base directory name
nobu 2018-01-17 15:38:08 +0900 (Wed, 17 Jan 2018) New Revision: 61884 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61884 Log: test_ast.rb: no base directory name * test/-ext-/ast/test_ast.rb: exclude base directory name from test method names. Modified files: trunk/test/-ext-/ast/test_ast.rb Index: test/-ext-/ast/test_ast.rb =================================================================== --- test/-ext-/ast/test_ast.rb (revision 61883) +++ test/-ext-/ast/test_ast.rb (revision 61884) @@ -112,18 +112,18 @@ class TestAst < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/-ext-/ast/test_ast.rb#L112 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 - helper = Helper.new(path) + helper = Helper.new("#{SRCDIR}/#{path}") helper.validate_range assert_equal([], helper.errors) 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 - helper = Helper.new(path) + helper = Helper.new("#{SRCDIR}/#{path}") helper.validate_not_cared assert_equal([], helper.errors) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/