From c71033c65f6fed1bb18a871a07983c365f531d96 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 26 Jan 2024 09:11:26 -0500 Subject: [PATCH] Clarify autorestore behavior --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b3cf54b..47845e48 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Dotenv.load('file1.env', 'file2.env') ## Autorestore in tests -Since 3.0, dotenv in a Rails app will automatically restore `ENV` to its original state before each test. This means you can modify `ENV` in your tests without fear of leaking state to other tests. It works with both `ActiveSupport::TestCase` and `Rspec`. +Since 3.0, dotenv in a Rails app will automatically restore `ENV` after each test. This means you can modify `ENV` in your tests without fear of leaking state to other tests. It works with both `ActiveSupport::TestCase` and `Rspec`. To disable this behavior, set `config.dotenv.autorestore = false` in `config/application.rb` or `config/environments/test.rb`.