blob: 8854382dc6b215f34127cbf0d91880334451afc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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
RSpec.configure do |config|
config.include FixtureHelpers
end
|