diff options
| author | cedricnjanga | 2017-10-24 19:10:11 +0200 | 
|---|---|---|
| committer | cedricnjanga | 2017-10-24 19:10:11 +0200 | 
| commit | a8ae0d3bf9105b17bfdb6dc22f527140f8edb6dd (patch) | |
| tree | 50bb2f3af42be39b85c17d070971b218c2b495a5 /spec/support/random.rb | |
| parent | 545671efd71380722dbc3272f5f513ea684891bd (diff) | |
| parent | 2568e7f7553c82adb0bed1521ef9f013df9df87e (diff) | |
| download | chouette-core-a8ae0d3bf9105b17bfdb6dc22f527140f8edb6dd.tar.bz2 | |
Merge branch 'master' into staging
Diffstat (limited to 'spec/support/random.rb')
| -rw-r--r-- | spec/support/random.rb | 6 | 
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 | 
