在ubuntu上进行自动测试没有任何作用 [英] autotest on ubuntu does nothing

查看:94
本文介绍了在ubuntu上进行自动测试没有任何作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行$ autotest或$ autotest -f都会得到相同的结果:

Running either $autotest or $autotest -f gives the same result:

#自[时间戳记]起等待

# Waiting since [timestamp]

更改控制器或规格文件只会使该行重复(带有新的时间戳).如果我尝试$ autotest -v,它不包含没有测试匹配的文件列表中的规范或控制器,我认为这很好.但是除了#waiting行之外,它什么也没有显示.

Changing a controller or spec file just gets that line repeated (with a newer timestamp). If I try $autotest -v, it does not include the spec or controller among the list of files for which no tests match, which I suppose is good; but it doesn't show anything else besides the #waiting line.

如果我在运行-v时对规格或控制器进行了更改,则输出为使用{[path/to/changed/file/] => [timestamp]}重复两次的哈希值.

If I make a change to a spec or controller while running -v, the output is a hash repeated twice with {[path/to/changed/file] => [timestamp]}.

这是Ubuntu 9.04,Ruby 1.9.2,Rails 3,autotest 4.3.2,autotest-rails 4.1.0和rspec 2.0.0.beta.20. (我也应该说rspec/spec本身可以正常工作.)有什么想法吗?

This is Ubuntu 9.04, Ruby 1.9.2, Rails 3, autotest 4.3.2, autotest-rails 4.1.0, and rspec 2.0.0.beta.20. (I should also say that rspec /spec on its own works fine.) Any ideas?

推荐答案

啊!我在进行rvm的第一个实验时就是这样做的,但是我把ZenTest作为/usr/lib/ruby​​中的一个宝石.即使我在想要的gemset中设置了"rvm use ___"(具有autotest和autotest-rails-pure gem的gemset)之后,命令"autotest"仍在/usr/bin/autotest上拾取了较旧的ZenTest文件.已经到位.因此,对于跟随railstutorial.org的任何人-确保您没有来自rvm之前使用的gem(或来自sudo gem安装的gem),这些gem会将文件保留在您意想不到的位置.

Aha! I was doing this as part of my first experiment with rvm, but I had ZenTest as a gem in /usr/lib/ruby. Even after I set 'rvm use ___' to the gemset I wanted - the one with the autotest and autotest-rails-pure gems - the command 'autotest' was still picking up the file at /usr/bin/autotest that the older ZenTest had put in place. So for anybody following the railstutorial.org - make sure you don't have gems from pre-rvm use (or from sudo gem installs) that are leaving files in places you don't expect.

对我来说,"sudo gem uninstall ZenTest"确实可以解决问题.

For me, 'sudo gem uninstall ZenTest' turned out to do the trick.

这篇关于在ubuntu上进行自动测试没有任何作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆