debian-mirror-gitlab/spec/support/helpers/fixture_helpers.rb
2018-10-15 14:42:47 +05:30

11 lines
284 B
Ruby

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