summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-02-14 18:14:40 +0100
committerRémy Coutable <remy@rymai.me>2018-02-14 19:22:05 +0100
commitd73458bbc51acf98bc2a2d4d86e10136ab75ca31 (patch)
tree30f48b810e4132e4fd5f070f493c67523af76fab /spec/support
parentdd633bc1888453a07474d045eca91a9e66302ce0 (diff)
downloadgitlab-ce-d73458bbc51acf98bc2a2d4d86e10136ab75ca31.tar.gz
Port some changes from gitlab-ee!4532 back to CEce-rc/move-more-ee-only-spec-files
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/factory_bot.rb (renamed from spec/support/factory_girl.rb)0
-rw-r--r--spec/support/fixture_helpers.rb8
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/support/factory_girl.rb b/spec/support/factory_bot.rb
index c7890e49c66..c7890e49c66 100644
--- a/spec/support/factory_girl.rb
+++ b/spec/support/factory_bot.rb
diff --git a/spec/support/fixture_helpers.rb b/spec/support/fixture_helpers.rb
index 128aaaf25fe..8854382dc6b 100644
--- a/spec/support/fixture_helpers.rb
+++ b/spec/support/fixture_helpers.rb
@@ -1,12 +1,12 @@
module FixtureHelpers
- def fixture_file(filename)
+ def fixture_file(filename, dir: '')
return '' if filename.blank?
- File.read(expand_fixture_path(filename))
+ File.read(expand_fixture_path(filename, dir: dir))
end
- def expand_fixture_path(filename)
- File.expand_path(Rails.root.join('spec/fixtures/', filename))
+ def expand_fixture_path(filename, dir: '')
+ File.expand_path(Rails.root.join(dir, 'spec', 'fixtures', filename))
end
end