aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/random.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/random.rb')
-rw-r--r--spec/support/random.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/random.rb b/spec/support/random.rb
index 59e1a1475..0ebc2ee5e 100644
--- a/spec/support/random.rb
+++ b/spec/support/random.rb
@@ -22,6 +22,12 @@ module Support
def random_string
SecureRandom.urlsafe_base64
end
+
+ def very_random(veryness=3, joiner: '-')
+ raise ArgumentError, 'not very random' unless veryness > 1
+ veryness.times.map{ SecureRandom.uuid }.join(joiner)
+ end
+
end
end