Welcome to mirror list, hosted at ThFree Co, Russian Federation.

fixture_helpers.rb « helpers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: eafdecb2e3defae4b12fd3b22a55ee577afb4b4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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