2015-08-20 15:41:47 -04:00
|
|
|
module FixtureHelpers
|
|
|
|
def fixture_file(filename)
|
|
|
|
return '' if filename.blank?
|
2017-11-14 04:02:39 -05:00
|
|
|
|
2017-04-12 14:11:35 -04: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 15:41:47 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
config.include FixtureHelpers
|
|
|
|
end
|