summaryrefslogtreecommitdiff
path: root/spec/support/fixture_helpers.rb
blob: 5515c355cea9b2b5bc4f2efa4b8b65eb8a3f60a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module FixtureHelpers
  def fixture_file(filename)
    return '' if filename.blank?
    File.read(expand_fixture_path(filename))
  end

  def expand_fixture_path(filename)
    File.expand_path(Rails.root.join('spec/fixtures/', filename))
  end
end

RSpec.configure do |config|
  config.include FixtureHelpers
end