I use gem 'dotenv-rails', '~> 0.9.0'to load environment variables into a Rails 4.0.5 application. I have a .env file along with .env.test. Everything works well in development, however, when it comes to testing that I do with rspec, it cannot set environment variables.
I went to the Rails console in a test environment, and I see that they are set to zero.
Any tips on how to get dotenv to load during testing?
source
share