summaryrefslogtreecommitdiff
path: root/spec/support/fixture_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/fixture_helpers.rb')
-rw-r--r--spec/support/fixture_helpers.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/support/fixture_helpers.rb b/spec/support/fixture_helpers.rb
index a05c9d18002..5515c355cea 100644
--- a/spec/support/fixture_helpers.rb
+++ b/spec/support/fixture_helpers.rb
@@ -1,8 +1,11 @@
module FixtureHelpers
def fixture_file(filename)
return '' if filename.blank?
- file_path = File.expand_path(Rails.root.join('spec/fixtures/', filename))
- File.read(file_path)
+ File.read(expand_fixture_path(filename))
+ end
+
+ def expand_fixture_path(filename)
+ File.expand_path(Rails.root.join('spec/fixtures/', filename))
end
end