Sha256: 102ed76b0dc9212846d9625d373e076f8b2d35301fdde45630fac69a824b51f7
Contents?: true
Size: 517 Bytes
Versions: 63
Compression:
Stored size: 517 Bytes
Contents
module Pageflow FactoryBot.define do factory :chapter, :class => Chapter do storyline transient do in_main_storyline_of { nil } end before(:create) do |chapter, evaluator| if revision = evaluator.in_main_storyline_of chapter.storyline = revision.storylines.first || fail('Expected revision to have a main storyline.') end end end factory :valid_chapter, :class => Chapter do title { 'Introduction' } end end end
Version data entries
63 entries across 63 versions & 1 rubygems