【发布时间】:2011-12-13 18:49:38
【问题描述】:
我有一个基本的 ruby 项目:-
$ tree
.
├── Gemfile
├── lib
│ ├── checkout.rb
│ └── item.rb
├── README.md
└── test
├── checkout_spec.rb
└── item_spec.rb
哪个可以运行 rspec 测试:-
$ rspec test/*_spec.rb
....
Finished in 0.18797 seconds
4 examples, 0 failures
但是谁想要每秒向上箭头并按回车,我想要自动测试......
但是当我运行它时,它找不到我的测试!
$ autotest -vw
No tests matched Gemfile
No tests matched README.md
No tests matched lib/checkout.rb
No tests matched lib/item.rb
No tests matched test/checkout_spec.rb
No tests matched test/item_spec.rb
然后我开始保存文件:-
{"lib/checkout.rb"=>2011-12-07 22:06:04 +0000}
No tests matched lib/checkout.rb
{"lib/checkout.rb"=>2011-12-07 22:06:04 +0000}
No tests matched lib/checkout.rb
{"test/.goutputstream-NQC45V"=>2011-12-07 22:06:20 +0000}
No tests matched test/.goutputstream-NQC45V
{"test/.goutputstream-NQC45V"=>2011-12-07 22:06:20 +0000}
No tests matched test/.goutputstream-NQC45V
{"lib/checkout.rb"=>2011-12-07 22:06:45 +0000}
No tests matched lib/checkout.rb
{"lib/checkout.rb"=>2011-12-07 22:06:45 +0000}
No tests matched lib/checkout.rb
<just sits here
我已阅读有关 .autotest 和 spec_helper.rb 的信息,但似乎可以在正确的搜索/页面上找到目标?
编辑:锡人发现的帮助和我的布局之间明显不匹配。
但是将我的 test 更改为 tests 并没有帮助!:-
No tests matched tests/checkout_spec.rb
No tests matched tests/item_spec.rb
No tests matched tests/rule_parser_spec.rb
No tests matched tests/runner.rb
No tests matched tests/spec_helper.rb
{"lib/rule_parser.rb"=>2011-12-08 07:24:29 +0000}
No tests matched lib/rule_parser.rb
{"lib/rule_parser.rb"=>2011-12-08 07:24:29 +0000}
No tests matched lib/rule_parser.rb
{"tests/checkout_spec.rb"=>2011-12-08 07:24:35 +0000}
No tests matched tests/checkout_spec.rb
{"tests/checkout_spec.rb"=>2011-12-08 07:24:35 +0000}
No tests matched tests/checkout_spec.rb
【问题讨论】: