debian-mirror-gitlab/spec/support/fixture_helpers.rb

15 lines
313 B
Ruby
Raw Normal View History

2015-09-25 12:07:36 +05:30
module FixtureHelpers
def fixture_file(filename)
return '' if filename.blank?
2017-08-17 22:00:37 +05:30
File.read(expand_fixture_path(filename))
end
def expand_fixture_path(filename)
File.expand_path(Rails.root.join('spec/fixtures/', filename))
2015-09-25 12:07:36 +05:30
end
end
RSpec.configure do |config|
config.include FixtureHelpers
end