From f0086f04667843cab696ad04e393948e3c3f5e96 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Tue, 30 Sep 2014 14:24:02 +0900 Subject: [PATCH] Load spec/env.test on application boot. --- config/application.rb | 2 ++ spec/spec_helper.rb | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/config/application.rb b/config/application.rb index 203406fc..d2cd9d95 100644 --- a/config/application.rb +++ b/config/application.rb @@ -4,6 +4,8 @@ require 'rails/all' Bundler.require(:default, Rails.env) +Dotenv.overload File.expand_path('../../spec/env.test', __FILE__) if Rails.env.test? + module Huginn class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b4a5a03a..e65454d4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -8,10 +8,6 @@ else Coveralls.wear!('rails') end -# Required ENV variables that are normally set in .env are setup here for the test environment. -require 'dotenv' -Dotenv.overload File.join(File.dirname(__FILE__), "env.test") - require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun'