Sha256: abf1bee00953908eef380cfe64441cf56787b123edbd482bf1d55f147b8fdfc5

Contents?: true

Size: 994 Bytes

Versions: 15

Compression:

Stored size: 994 Bytes

Contents

Factory.sequence :email do |n|
  "somebody#{n}@example.com"
end

Factory.sequence :login do |n|
  "inquire#{n}"
end

Factory.sequence :name do |n|
  "a_name#{n}"
end

Factory.sequence :abbr do |n|
  "abbr#{n}"
end

Factory.sequence :description do |n|
  "This is the description: #{n}"
end

Factory.define :state do |f|
  f.name { Factory.next(:name) }
  f.abbreviation { Factory.next(:abbr) }
  f.country {|a| a.association(:country) }
end

Factory.define :country do |f|
  f.name { Factory.next(:name) }
  f.abbreviation { Factory.next(:abbr) }
end

Factory.define :user do |f|
  f.login { Factory.next(:login) }
  f.email { Factory.next(:email) }
  f.password 'inquire_pass'
  f.password_confirmation 'inquire_pass'
  f.first_name 'test'
  f.last_name 'guy'
  f.terms_of_service true
  f.activated_at DateTime.now
end

Factory.define :permission do |f|
  f.role {|a| a.association(:role)}
  f.user {|a| a.association(:user)}
end

Factory.define :role do |f|
  f.rolename 'administrator'
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
muck-friends-0.1.15 test/rails_root/test/factories.rb
muck-friends-0.1.14 test/rails_root/test/factories.rb
muck-friends-0.1.13 test/rails_root/test/factories.rb
muck-friends-0.1.12 test/rails_root/test/factories.rb
muck-friends-0.1.11 test/rails_root/test/factories.rb
muck-friends-0.1.10 test/rails_root/test/factories.rb
muck-friends-0.1.5 test/rails_root/test/factories.rb
muck-friends-0.1.6 test/rails_root/test/factories.rb
muck-friends-0.1.7 test/rails_root/test/factories.rb
muck-friends-0.1.8 test/rails_root/test/factories.rb
muck-friends-0.1.9 test/rails_root/test/factories.rb
muck-friends-0.1.1 test/rails_root/test/factories.rb
muck-friends-0.1.2 test/rails_root/test/factories.rb
muck-friends-0.1.3 test/rails_root/test/factories.rb
muck-friends-0.1.4 test/rails_root/test/factories.rb