Sha256: 1b716c0d48c350f2ebf9ea36678ba999baaca7c176a376dd7f3f8dfb039b46d8
Contents?: true
Size: 605 Bytes
Versions: 3
Compression:
Stored size: 605 Bytes
Contents
require 'machinist/active_record' require 'faker' # START blueprints Account.blueprint do name { Faker::Name.first_name } surname { Faker::Name.last_name } email { Faker::Internet.email } password { "password" } password_confirmation { "password" } role { "admin" } end # END blueprints # A factory which we can use to build objects which are a bit more complex or # which require special setup which can't be done by Machinist without a bit of # help. # module Factory class << self def make_admin account = Account.make! account.save! account end end end
Version data entries
3 entries across 3 versions & 1 rubygems