The customization suggested to include `.env.local` in the test environment uses `unshift`, but this will put `env.local` at the highest precedence. ```ruby # config/application.rb Bundler.require(*Rails.groups) # Load .env.local in test Dotenv::Rails.files.unshift(".env.local") if ENV["RAILS_ENV"] == "test" module YourApp class Application < Rails::Application # ... end end ``` Instead, it should be inserted between `.env.test.local` and `.env.test` Suggestion: ```ruby # Load .env.local in test if ENV["RAILS_ENV"] == "test" files = Dotenv::Rails.files index = files.index(".env.test.local")&.succ || files.index(".env.test") || 0 files.insert(index, ".env.local") end ```
Activity
Fix README: .env.local in test should not outrank .env.test.local