Sha256: 7758fb5a8544eaa18025edcd2fb176053887faadcaa82c5aa7dad9733f0da3a6

Contents?: true

Size: 558 Bytes

Versions: 32

Compression:

Stored size: 558 Bytes

Contents

def random_email_address
  "#{random_string}@example.com"
end

def random_string
  random_alpha_string_of_length(10)
end

def random_alpha_string_of_length(length)
  letters = *'a'..'z'
  random_string_for_uniqueness = ''
  length.times { random_string_for_uniqueness += letters[rand(letters.size - 1)]}
  random_string_for_uniqueness
end

def random_number_string_of_length(length)
  numbers = *'0'..'9'
  random_string_for_uniqueness = ''
  length.times { random_string_for_uniqueness += numbers[rand(numbers.size - 1)]}
  random_string_for_uniqueness
end

Version data entries

32 entries across 32 versions & 8 rubygems

Version Path
hashrocket-mousetrap-0.2.0 spec/support/random_data.rb
hashrocket-mousetrap-0.2.1 spec/support/random_data.rb
hashrocket-mousetrap-0.3.0 spec/support/random_data.rb
sproutbox-mousetrap-0.6.4 spec/support/random_data.rb
oel-brenner-mousetrap-0.5.2 spec/support/random_data.rb
cameroncox-mousetrap-0.6.2 spec/support/random_data.rb
cameroncox-mousetrap-0.6.1 spec/support/random_data.rb
ambethia-mousetrap-0.5.1 spec/support/random_data.rb
ryanwood-mousetrap-0.5.7 spec/support/random_data.rb
ryanwood-mousetrap-0.5.6 spec/support/random_data.rb
madebyrocket-mousetrap-0.5.3.8 spec/support/random_data.rb
madebyrocket-mousetrap-0.5.3.7 spec/support/random_data.rb
cameroncox-mousetrap-0.5.3.10 spec/support/random_data.rb
cameroncox-mousetrap-0.5.3.9 spec/support/random_data.rb
cameroncox-mousetrap-0.5.3.8 spec/support/random_data.rb
cameroncox-mousetrap-0.5.3.7 spec/support/random_data.rb
cameroncox-mousetrap-0.5.3.6 spec/support/random_data.rb
cameroncox-mousetrap-0.5.3.5 spec/support/random_data.rb
cameroncox-mousetrap-0.5.3.4 spec/support/random_data.rb
cameroncox-mousetrap-0.5.3.3 spec/support/random_data.rb