memoize RAILS_ENV for testing