Sha256: fb508fc641b4eb9b1fc298098678c7650866bafb03b92478387ebbdc9a8fb3d8

Contents?: true

Size: 727 Bytes

Versions: 1

Compression:

Stored size: 727 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'mousetrap'
require 'spec'
require 'spec/autorun'

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

1 entries across 1 versions & 1 rubygems

Version Path
hashrocket-mousetrap-0.1.1 spec/spec_helper.rb