From 0b7848522757db2a458e3628aefed976490d23bf Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 23 Aug 2019 19:00:26 -0500 Subject: [PATCH] dotenv: load .env.local before initializers. --- config/environment.rb | 2 ++ test/test_helper.rb | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environment.rb b/config/environment.rb index 426333bb4..f38575b7c 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,7 @@ # Load the Rails application. require_relative 'application' +Dotenv.load(Rails.root + ".env.local") + # Initialize the Rails application. Rails.application.initialize! diff --git a/test/test_helper.rb b/test/test_helper.rb index 908aa7793..d28ab0787 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -16,8 +16,6 @@ require 'webmock/minitest' Dir[File.expand_path(File.dirname(__FILE__) + "/factories/*.rb")].each {|file| require file} Dir[File.expand_path(File.dirname(__FILE__) + "/test_helpers/*.rb")].each {|file| require file} -Dotenv.load(Rails.root + ".env.local") - Shoulda::Matchers.configure do |config| config.integrate do |with| with.test_framework :minitest