2015-08-20 19:41:47 +00:00
|
|
|
module FixtureHelpers
|
|
|
|
def fixture_file(filename)
|
|
|
|
return '' if filename.blank?
|
2017-11-14 09:02:39 +00:00
|
|
|
|
2017-04-12 18:11:35 +00:00
|
|
|
File.read(expand_fixture_path(filename))
|
|
|
|
end
|
|
|
|
|
|
|
|
def expand_fixture_path(filename)
|
|
|
|
File.expand_path(Rails.root.join('spec/fixtures/', filename))
|
2015-08-20 19:41:47 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
config.include FixtureHelpers
|
|
|
|
end
|