gitlab-org--gitlab-foss/spec/support/fixture_helpers.rb
Jacopo 181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00

15 lines
314 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