Sha256: a2e436b86ca975a781a52a49df11e193d1ec79ce3dc9d714b49e799f18e6d3e9

Contents?: true

Size: 338 Bytes

Versions: 27

Compression:

Stored size: 338 Bytes

Contents

def random(range=(1..8))
  chars = ["A".."Z","0".."9"].collect { |r| Array(r) }.join
  range.collect { chars[rand(chars.size)] }.join
end

FactoryGirl.define do
  sequence(:email) { |n| "foo#{n}_#{random}@bar.com" }

  sequence :handle do |n|
    "handle-#{random}-#{n}"
  end

  sequence :name do |n|
    "name_#{random}_#{n}"
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
locomotivecms-3.3.0 spec/support/sequences.rb
locomotivecms-3.3.0.rc3 spec/support/sequences.rb
locomotivecms-3.3.0.rc2 spec/support/sequences.rb
locomotivecms-3.1.2 spec/support/sequences.rb
locomotivecms-3.2.1 spec/support/sequences.rb
locomotivecms-3.3.0.rc1 spec/support/sequences.rb
locomotivecms-3.2.0 spec/support/sequences.rb
locomotivecms-3.2.0.rc2 spec/support/sequences.rb
locomotivecms-3.2.0.rc1 spec/support/sequences.rb
locomotivecms-3.1.1 spec/support/sequences.rb
locomotivecms-3.1.0 spec/support/sequences.rb
locomotivecms-3.1.0.rc3 spec/support/sequences.rb
locomotivecms-3.1.0.rc2 spec/support/sequences.rb
locomotivecms-3.1.0.rc1 spec/support/sequences.rb
locomotivecms-3.0.1 spec/support/sequences.rb
locomotivecms-3.0.0 spec/support/sequences.rb
locomotivecms-3.0.0.rc7 spec/support/sequences.rb
locomotivecms-3.0.0.rc6 spec/support/sequences.rb
locomotivecms-3.0.0.rc5 spec/support/sequences.rb
locomotivecms-3.0.0.rc4 spec/support/sequences.rb