如何从命令行使用 Rake 运行目录中的所有测试文件?

问题描述 投票:0回答:1

我有一些测试文件夹:

app/
  test/
    folder1/
      test1.rb
      test2.rb
    folder2/
      test2.1.rb
      test2.2.rb

我只想从命令行运行“folder2”目录中的测试(不实现 Rake TestCase)。

我尝试过:

rake test TEST=test/folder1/test*.rb
ruby command-line rake
1个回答
0
投票

对于模式,星号必须转义。

解决方案:

rake test TEST=test/folder1/test\*.rb
© www.soinside.com 2019 - 2024. All rights reserved.