This seems to be mostly asked question, I have an application when run in both rake spec
and rspec
the output seems to be different. When rspec spec -p command is used 0 failures message is displayed while when rake spec is used few errors are displayed.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
When you run $ bundle exec rspec # (defaults to spec)
, all the files in the ./spec
directory are executed.
When you run $ bundle exec rake spec
, you're executing all of the rake tasks named 'spec'
from all the gems and from their dependencies.
Also the environment under which tests are executed may vary accordingly to those files. Don't wonder if you face different outputs.