我喜欢在单独的选项卡中运行我的Rspec测试.我通常使用rspec spec
来运行测试,我想说"递归搜索并运行spec
文件夹中的所有内容"
我最近意识到这并不是我所有的测试都能运行.我现在有一个spec/requests
中的spec文件没有运行.我之所以知道这一点,是因为我编辑了其中一个测试以引发错误,并运行了以下程序:
-
rspec spec
-没有出现错误. -
rspec spec/requests
-仍然没有出现错误,0 examples, 0 failures
! -
rspec spec/requests/my_controller.rb
- bingo.17 examples, 1 failure
和故障有我的错误信息.
Why isn't Rspec finding all my test files? Is this a matter of configuration, or do I need to use a different command to run my tests?
我需要一次运行所有测试,以确保我没有引入回归.
(顺便说一句,不使用Spork也没什么区别.)