debian-mirror-gitlab/spec/support/fixture_helpers.rb
2017-08-17 22:00:37 +05:30

14 lines
313 B
Ruby

module FixtureHelpers
def fixture_file(filename)
return '' if filename.blank?
File.read(expand_fixture_path(filename))
end
def expand_fixture_path(filename)
File.expand_path(Rails.root.join('spec/fixtures/', filename))
end
end
RSpec.configure do |config|
config.include FixtureHelpers
end