scube-server/spec/factories.rb
Thibault Jouan f49a5a3f67 Update to rails 3.1.0
* Bump rails version to 3.1.0 in Gemfile
* Update config files
* Fix bcrypt monkey patch for specs
* Fix TracksController
* Replace track streaming with track download
* Remove assets from application layout
2011-09-15 16:10:21 +00:00

24 lines
471 B
Ruby

FactoryGirl.define do
factory :playlist do
name 'Electro'
user
end
factory :track do
name 'Mega song'
mime_type 'audio/ogg'
sha256 '94a5486a69a7261da350c57f9e5a1eaa789e08752cfc56a1989976a6ad82f7a8'
after_create do |t|
t.save_with_file(File.new("#{Rails.root}/spec/fixtures/test.mp3"), 'audio/mpeg')
end
end
factory :user do
sequence :email do |n|
"alice_#{n}@example.net"
end
password '733tP4s5'
end
end