如何全局配置RSpec以保持'--color'和'--format specdoc'选项打开 [英] How do I globally configure RSpec to keep the '--color' and '--format specdoc' options turned on
本文介绍了如何全局配置RSpec以保持'--color'和'--format specdoc'选项打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Ubuntu中为RSpec设置全局配置。
How do I set global configuration for RSpec in Ubuntu.
具体来说,--color和--format specdoc保持开启,每次我在任何地方运行rspec。)
Specifically so, --color and --format specdoc stay turned on, across all my projects (ie every time I run rspec anywhere).
推荐答案
正如你可以在文档这里,目的用途是创建〜/。 rspec
,并在其中输入您的选项,例如 - color
。
As you can see in the docs here, the intended use is creating ~/.rspec
and in it putting your options, such as --color
.
使用 - color
选项快速创建〜/ .rspec
文件,只需运行:
To quickly create an ~/.rspec
file with the --color
option, just run:
echo '--color' >> ~/.rspec
这篇关于如何全局配置RSpec以保持'--color'和'--format specdoc'选项打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文