Rspec spec & Rake spec gives different result

匿名 (未验证) 提交于 2019-12-03 02:33:02

问题:

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.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!