Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Factory.define :user do |f|
- f.email "joey@ramones.com"
- f.password f.password_confirmation("rockaway")
- end
- Factory.define :song do |f|
- f.title "I Wanna Be Sedated"
- f.artist "Ramones"
- f.credits "Recorded on February 12-19, 1976 at Plaza Sound, Radio City Music Hall in New York City for Sire Records. All Songs by The Ramones."
- f.artwork "name-of-the-file.jpg"
- f.user { Factory :user }
- end
- require "test_helper"
- describe Song do
- it "has a valid factory" do
- Factory.create :song
- end
- end
- Factory.define :user do |f|
- f.email "joey@ramones.com"
- f.password f.password_confirmation("rockaway")
- Factory.define :song do |f|
- f.title "I Wanna Be Sedated"
- f.artist "Ramones"
- f.album "Road to Ruin"
- f.date "1978"
- f.credits "Recorded on February 12-19, 1976 at Plaza Sound, Radio City Music Hall in New York City for Sire Records. All Songs by The Ramones."
- f.artwork "name-of-the-file.jpg"
- f.user_id "1"
- end
- end
Add Comment
Please, Sign In to add comment