轨道 3 + Rspec 2 +自动测试:自动测试未加载
我已经安装了 autotest 和 Rspec2,但 Autotest 不想运行。文件夹 autotest 尚未创建(我手动创建了它并添加了 discovery.rb),当我运行 autotest 时,这就是我所经历的:
$ autotest
loading autotest/rails_rspec2
style: RailsRspec2
--------------------------------------------------------------------------------
$
我已经使用 autotest 很长时间了,现在它已经死了。有什么理由吗?
谢谢
I have installed autotest and Rspec2 but Autotest does not want to run. The folder autotest has not been created (I have created it by hand and added discover.rb) and when I run autotest this is what I get over and oveR:
$ autotest
loading autotest/rails_rspec2
style: RailsRspec2
--------------------------------------------------------------------------------
$
I've been using autotest for a long time and now it's dead. Any reason why?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
需要做什么取决于 rspec 版本,但对于 2.3 以上,请参考上述 rspec wiki 的说明https://github.com/rspec/rspec/wiki/autotest 告诉你:
“确保项目根目录中有一个 .rspec 文件。它告诉 RSpec 告诉 Autotest 加载 RSpec 的自动测试扩展。”
您可以创建类似
touch .rspec
的文件该文件不需要有任何内容,但必须存在。
如果您安装了 rspec-rails,您还可以运行
rails g rspec:install
它会为您创建此文件。默认内容只是一个选项--colour
What needs to be done depends on the rspec version, but for 2.3 above the instructions from the above mentioned rspec wiki https://github.com/rspec/rspec/wiki/autotest tell you this:
"Make sure you have a .rspec file in the project root. That tells RSpec to tell Autotest to load RSpec’s autotest extension."
You may just create the file like
touch .rspec
The file need not to have any content, but it must exists.
In case you have rspec-rails installed you can also run
rails g rspec:install
and it will create this file for you. The default content being simply one option--colour