Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何更改默认值';测试';Ruby自动测试中的文件夹_Ruby_Autotest - Fatal编程技术网

如何更改默认值';测试';Ruby自动测试中的文件夹

如何更改默认值';测试';Ruby自动测试中的文件夹,ruby,autotest,Ruby,Autotest,我的测试文件夹位于lib/foo/test中,而不是/test。如何让Autotest查看lib/foo/test以运行测试?我试图在.autotest文件中添加一些带有映射的钩子,但没有成功。提前谢谢。我很抱歉没有提供直接的答案,但我自己已经停止使用自动测试,转而使用Guard。Guard是一个普通的Ruby进程,它位于test::unit或rspec之外,因此更易于配置 您想要在Guard中轻松完成的工作,只需在项目根目录中编写一个Guardfile,并提及要监视的目录: watch("l

我的测试文件夹位于lib/foo/test中,而不是/test。如何让Autotest查看lib/foo/test以运行测试?我试图在.autotest文件中添加一些带有映射的钩子,但没有成功。提前谢谢。

我很抱歉没有提供直接的答案,但我自己已经停止使用自动测试,转而使用Guard。Guard是一个普通的Ruby进程,它位于test::unit或rspec之外,因此更易于配置

您想要在Guard中轻松完成的工作,只需在项目根目录中编写一个Guardfile,并提及要监视的目录:

watch("lib/foo/test") { |m| "test/lib/foo/test/#{m[1]}_test.rb" }

显然,它可以根据您的需要进一步定制。

谢谢您的提示,我不知道Guard,但我现在坚持使用Autotest。