gitlab-org--gitlab-foss/spec/support/helpers/fixture_helpers.rb

12 lines
284 B
Ruby
Raw Normal View History

2015-08-20 15:41:47 -04:00
module FixtureHelpers
def fixture_file(filename, dir: '')
2015-08-20 15:41:47 -04:00
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))
2015-08-20 15:41:47 -04:00
end
end