<commit_before>FactoryGirl.define do
  factory :collection, class: Admin::Collection do
    sequence(:name) {|n| "Collection #{n}" }
    unit {"University Archives"}
    description {Faker::Lorem.sentence}
    managers {[FactoryGirl.create(:manager).username]}
    editors {[FactoryGirl.create(:user).username]}
    depositors {[FactoryGirl.create(:user).username]}
  end
end<commit_msg>Add item(s) creation to collection factory<commit_after>FactoryGirl.define do
  factory :collection, class: Admin::Collection do
    sequence(:name) {|n| "Collection #{n}" }
    unit {"University Archives"}
    description {Faker::Lorem.sentence}
    managers {[FactoryGirl.create(:manager).username]}
    editors {[FactoryGirl.create(:user).username]}
    depositors {[FactoryGirl.create(:user).username]}

    ignore { items 0 }
    after(:create) do |c, env|
      1.upto(env.items) { FactoryGirl.create(:media_object, collection: c) }
    end
  end
end
{'fraction_non_alphanumeric': 0.14422057264050903, 'fraction_numerical': 0.0021208907741251328, 'mean_word_length': 4.7560975609756095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1337035', 'n_tokens_mistral': 290, 'n_tokens_neox': 278, 'n_words': 64}