如何全局配置 RSpec 以保持“--color"和“--format specdoc"选项处于打开状态 [英] How do I globally configure RSpec to keep the '--color' and '--format specdoc' options turned on

查看:15
本文介绍了如何全局配置 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).

推荐答案

如您在文档中所见 here,预期用途是创建 ~/.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆