debian-mirror-gitlab/spec/support/helpers/fixture_helpers.rb
2023-05-27 22:25:52 +05:30

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