Sha256: 3f9e140c457e49c6b6788f18abe7f54b21b277a698ae8da3ac85e7b5ed35aa1d
Contents?: true
Size: 630 Bytes
Versions: 37
Compression:
Stored size: 630 Bytes
Contents
FactoryBot.define do factory :book do name { Faker::Lorem.sentence(word_count: 3) } description { Faker::Lorem.sentence(word_count: 30) } slug { "mumuki/mumuki-test-book-#{SecureRandom.uuid}" } end factory :book_with_full_tree, parent: :book do transient do children_factor { 3 } exercises { create_list(:exercise, children_factor) } lessons { create_list(:lesson, children_factor, exercises: exercises) } chapters { create_list(:chapter, children_factor, lessons: lessons) } end after(:build) do |book, evaluator| book.chapters = evaluator.chapters end end end
Version data entries
37 entries across 37 versions & 1 rubygems