Load environment variables from .env file when testing
#
# If you are working with the foreman gem and .env files, you are probably need to load
# the environment varialbes from the .env file.
#
# Load the environment variables from the .env file in development.
open('.env', 'r').readlines.each {|l| kv = l.split('='); ENV[kv[0]] = kv[1];}
Written by Shavit
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#