rake cucumber and rake spec always use “develop” environment

后端 未结 3 2034
心在旅途
心在旅途 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:35

    When you upgraded to Rails 3, did you perhaps do a global find and replace on RAILS_ENV?

    Is the first line of test_helper.rb something other than this?

    ENV["RAILS_ENV"] = "test"

    In the actual environment variables, it should still be RAILS_ENV, not ::Rails.env, so make sure you don't have ENV["Rails.env"] = "test" for that line of code.

    Make sure it looks like it used to. Not that I would know from having made this mistake personally... :-)

提交回复
热议问题