Sha256: 9a249627b607cac7b9dcedf7f9984cf0d71e236cb19a30d6e10c57e1613c41ec

Contents?: true

Size: 355 Bytes

Versions: 5

Compression:

Stored size: 355 Bytes

Contents

FactoryGirl.define do
  factory :event do
    description { "<p>#{Faker::Lorem.paragraphs(2).join('</p><p>')}</p>" }
    calendar { Calendar.friendly.find('admin-calendar') }
    transient do
      owner { User.find_by_name('Admin User') }
    end
    after(:create) do |record, evaluator|
      evaluator.owner.add_role(:owner, record)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
date_book-0.0.6 spec/factories/events.rb
date_book-0.0.5 spec/factories/events.rb
date_book-0.0.3 spec/factories/events.rb
date_book-0.0.2 spec/factories/events.rb
date_book-0.0.1 spec/factories/events.rb