f0391c2517
Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
13 lines
315 B
Ruby
13 lines
315 B
Ruby
# frozen_string_literal: true
|
|
|
|
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
|