summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2015-03-09 11:15:01 +0000
committerintrigeri <intrigeri@boum.org>2015-03-09 11:15:01 +0000
commit5fe8d9c30f2b687c451881331a0ee6097803dcff (patch)
tree9065e90961bfe181de722ef47d23e3f58f823345
parent94412752d502bf0e12429797746839d15ee27d06 (diff)
Simply code a little bit.
-rw-r--r--features/support/helpers/misc_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/features/support/helpers/misc_helpers.rb b/features/support/helpers/misc_helpers.rb
index 893c6c4..2be06b6 100644
--- a/features/support/helpers/misc_helpers.rb
+++ b/features/support/helpers/misc_helpers.rb
@@ -118,7 +118,7 @@ ALNUM_SET = ALPHA_SET + (0..9).to_a.map { |n| n.to_s }
def generate_random_string_from_set(set, min_len, max_len)
len = (min_len..max_len).to_a.sample
len ||= min_len
- (0..len-1).map { |n| set.sample }.join
+ set.sample(len).join
end
def generate_random_alpha_string(min_len, max_len = 0)