gitlab-org--gitlab-foss/spec/support/git_helpers.rb
Timothy Andrew 0f44c5a56f Generate branch/file names more randomly to avoid failures.
- Tests would randomly fail because of naming conflicts.
- Use a `random_git_name` method instead of using `FFaker` directly.
2016-09-07 11:26:07 +05:30

9 lines
181 B
Ruby

module GitHelpers
def random_git_name
"#{FFaker::Product.brand}-#{FFaker::Product.brand}-#{rand(1000)}"
end
end
RSpec.configure do |config|
config.include GitHelpers
end