BigW Consortium Gitlab

fixture_helpers.rb 313 Bytes
Newer Older
Douwe Maan committed
1 2 3
module FixtureHelpers
  def fixture_file(filename)
    return '' if filename.blank?
4 5 6 7 8
    File.read(expand_fixture_path(filename))
  end

  def expand_fixture_path(filename)
    File.expand_path(Rails.root.join('spec/fixtures/', filename))
Douwe Maan committed
9 10 11 12 13 14
  end
end

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