Sha256: 44487c26910c039fd926f0bcb8d7771f9e9140fe433ff79157f128278f428e63

Contents?: true

Size: 629 Bytes

Versions: 3

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :album do
    name { Faker::Music.album }
    trait :with_default_names do
      album_names = [
        "The Very Best of Kool & The Gang",
        "Born in the Wild",
        "Where the Butterflies Go in the Rain",
        "All the Best: The Hits",
        "On the Radio: Greatest Hits, Vol. I & II",
        "Confessions (Expanded Edition)",
        "The Best Of Bill Withers: Lean On Me",
        "The Ultimate Collection (Remastered)"
      ]
  
      album_names.each do |album_name|
        Album.find_or_create_by(name: album_name)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
recommender-2.0.1 spec/factories/albums.rb
recommender-2.0.0 spec/factories/albums.rb
recommender-0.1.0 spec/factories/albums.rb