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:
Diffstat (limited to 'spec/support/helpers/fast_rails_root.rb')
-rw-r--r--spec/support/helpers/fast_rails_root.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/helpers/fast_rails_root.rb b/spec/support/helpers/fast_rails_root.rb
new file mode 100644
index 00000000000..1510fe0825c
--- /dev/null
+++ b/spec/support/helpers/fast_rails_root.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+# For specs which don't load Rails, provide a path to Rails root
+module FastRailsRoot
+ RAILS_ROOT = File.absolute_path("#{__dir__}/../../..")
+
+ def rails_root_join(*args)
+ File.join(RAILS_ROOT, *args)
+ end
+end