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

前端 未结 6 833
日久生厌
日久生厌 2020-12-22 17:42

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 rspe

6条回答
  •  误落风尘
    2020-12-22 18:11

    In your spec_helper.rb file, include the following option:

    RSpec.configure do |config|
      config.color_enabled = true
    end
    

    You then must require in each *_spec.rb file that should use that option.

提交回复
热议问题