summaryrefslogtreecommitdiff
path: root/scripts/setup-test-env
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-12-03 12:10:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-12-03 12:10:23 +0000
commit5f0d27d131aced1a53e8cbc7db023d9f947f8a1a (patch)
tree7007c07fc37c95638f3e71c1902dcd055db1d8ca /scripts/setup-test-env
parentcc8ea69201e2e4d020018c43efeb993c44cd8a71 (diff)
downloadgitlab-ce-5f0d27d131aced1a53e8cbc7db023d9f947f8a1a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/setup-test-env')
-rwxr-xr-xscripts/setup-test-env12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/setup-test-env b/scripts/setup-test-env
index c955a01d769..a81aaa5cda3 100755
--- a/scripts/setup-test-env
+++ b/scripts/setup-test-env
@@ -13,7 +13,17 @@ require 'active_support/string_inquirer'
ENV['SKIP_RAILS_ENV_IN_RAKE'] = 'true'
-require_relative 'override_rails_constants'
+module Rails
+ extend self
+
+ def root
+ Pathname.new(File.expand_path('..', __dir__))
+ end
+
+ def env
+ @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "test")
+ end
+end
ActiveSupport::Dependencies.autoload_paths << 'lib'