diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-09-07 08:28:19 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-09-07 08:56:07 +0300 |
commit | 0f44c5a56fdc5986797808c508d7b42236cee450 (patch) | |
tree | 423d79a1157e375984615adf619310c5a6b8ad78 /spec/support | |
parent | 71a9bcd3def27a46223ea052e7fe3560869b9d6d (diff) |
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.
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/git_helpers.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/support/git_helpers.rb b/spec/support/git_helpers.rb new file mode 100644 index 00000000000..93422390ef7 --- /dev/null +++ b/spec/support/git_helpers.rb @@ -0,0 +1,9 @@ +module GitHelpers + def random_git_name + "#{FFaker::Product.brand}-#{FFaker::Product.brand}-#{rand(1000)}" + end +end + +RSpec.configure do |config| + config.include GitHelpers +end |