This adds Dotenv.save and Dotenv.restore to save and restore the ENV, and automatially configures Rails apps to use it in tests (RSpec or AS::TestCase).
Disable by setting config.dotenv.autorestore = false in config/enviroments/test.rb or config/application.rb
This adds
Dotenv.save
andDotenv.restore
to save and restore theENV
, and automatially configures Rails apps to use it in tests (RSpec or AS::TestCase).Disable by setting
config.dotenv.autorestore = false
inconfig/enviroments/test.rb
orconfig/application.rb
Prior art:
Even though those are fine alternatives, I think it's still worth including this in dotenv by default.