Sha256: 43721c69a25c361352e894b0ef4b9bbd6985e67f601ef98d891fcec8821217b1
Contents?: true
Size: 1.01 KB
Versions: 4
Compression:
Stored size: 1.01 KB
Contents
FactoryGirl.define do factory :event, class: OpenConferenceWare::Event do sequence(:title) { |n| "Event #{n}" } deadline { Date.today.to_time + 1.day } open_text "We're accepting proposals" closed_text "We're not accepting proposals" proposal_status_published false session_text "We have sessions" tracks_text "We have tracks" start_date { Date.today.to_time + 2.days } end_date { Date.today.to_time + 3.days } accept_proposal_comments_after_deadline false slug { |record| record.title.downcase.gsub(/[^\w]/, '') } schedule_published false parent_id nil proposal_titles_locked false factory :populated_event do after(:create) do |record, evaluator| record.rooms << create(:room, event: record) if record.rooms.empty? record.tracks << create(:track, event: record) if record.tracks.empty? record.session_types << create(:session_type, event: record) if record.session_types.empty? end end end end
Version data entries
4 entries across 4 versions & 1 rubygems