Evolve Evolve - 9 months ago 44
Ruby Question

How do I globally configure RSpec to keep the '--color' and '--format specdoc' options turned on

How do I set global configuration for RSpec in Ubuntu.

Specifically so, --color and --format specdoc stay turned on, across all my projects (ie every time I run rspec anywhere).

Answer Source

As you can see in the docs here, the intended use is creating ~/.rspec and in it putting your options, such as --color.

To quickly create an ~/.rspec file with the --color option, just run:

echo '--color' >> ~/.rspec