rake cucumber and rake spec always use “develop” environment

后端 未结 3 2014
心在旅途
心在旅途 2021-02-14 04:01

My rake tasks for running Cucumber and RSpec tests are always using my development environment.

Here are the relevant config files:

RAILS_ROOT

3条回答
  •  有刺的猬
    2021-02-14 04:38

    On RAILS_ROOT/Gemfile

    do: add specific test-only gems to this group:

    group :test do
      gem 'cucumber-rails'
      gem 'capybara'
      gem 'database_cleaner'
    end
    

    Instead of setting them to be used on development and everywhere else too. This should work.

    P.S: edit the code above to set the gems you'll be using for your test, I just copy/pasted the ones Im using on the project I have currently open as an example.

提交回复
热议问题