summaryrefslogtreecommitdiff
path: root/spec/support/helpers/fixture_helpers.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-04-26 10:13:10 +0100
committerPhil Hughes <me@iamphill.com>2018-04-26 10:13:10 +0100
commitc83ed559e107476a4cf9d50fd35874d523506486 (patch)
tree3565d13bb447ba3b7a9c06e2991543514714de64 /spec/support/helpers/fixture_helpers.rb
parent70affaa0663f8fd4aa1aa08f85e35d312e78fee1 (diff)
parent9f35f6d9d53638aeb8ee917a388705458ddd87d7 (diff)
downloadgitlab-ce-c83ed559e107476a4cf9d50fd35874d523506486.tar.gz
Merge branch 'ide-workbench-bar' into ide-activity-bar-review-mode
Diffstat (limited to 'spec/support/helpers/fixture_helpers.rb')
-rw-r--r--spec/support/helpers/fixture_helpers.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/helpers/fixture_helpers.rb b/spec/support/helpers/fixture_helpers.rb
new file mode 100644
index 00000000000..611d19f36a0
--- /dev/null
+++ b/spec/support/helpers/fixture_helpers.rb
@@ -0,0 +1,11 @@
+module FixtureHelpers
+ def fixture_file(filename, dir: '')
+ return '' if filename.blank?
+
+ File.read(expand_fixture_path(filename, dir: dir))
+ end
+
+ def expand_fixture_path(filename, dir: '')
+ File.expand_path(Rails.root.join(dir, 'spec', 'fixtures', filename))
+ end
+end