Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-08-28 04:53:29 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2019-08-28 04:53:29 +0300
commit834f7861e57769d47ebf4dc7ac6b57b39064f8fc (patch)
treec5d1524b58bfc3a1b8318a270a5ca9d13842835d /spec/support
parent5822c09296e2439df3150d2ac7007396f66f3210 (diff)
Add new RailsHelpers module for specs
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/rails_helpers.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/helpers/rails_helpers.rb b/spec/support/helpers/rails_helpers.rb
new file mode 100644
index 00000000000..e1875b2fb15
--- /dev/null
+++ b/spec/support/helpers/rails_helpers.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+module RailsHelpers
+ def stub_rails_env(env_name)
+ allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new(env_name))
+ end
+end