diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-20 22:41:47 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-20 22:41:47 +0300 |
commit | 54b04f1c5b6c486a67c654ee9987e5f5ec4501fd (patch) | |
tree | 6c191226132073546adca92f259d1d17400949ba /spec/support/fixture_helpers.rb | |
parent | ac268674edfdaa5b8232f9875481410fc5112f60 (diff) |
Add fixture_file helper.
Diffstat (limited to 'spec/support/fixture_helpers.rb')
-rw-r--r-- | spec/support/fixture_helpers.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/fixture_helpers.rb b/spec/support/fixture_helpers.rb new file mode 100644 index 00000000000..a05c9d18002 --- /dev/null +++ b/spec/support/fixture_helpers.rb @@ -0,0 +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) + end +end + +RSpec.configure do |config| + config.include FixtureHelpers +end |