spec/factories/assets.rb in rails-uploader-0.0.3 vs spec/factories/assets.rb in rails-uploader-0.0.4
- old
+ new
@@ -1,6 +1,11 @@
# Read about factories at https://github.com/thoughtbot/factory_girl
-FactoryGirl.define do
- factory :asset do
+FactoryGirl.define do
+ factory :picture, :class => Picture do
+ data File.open('spec/factories/files/rails.png')
+ data_content_type "image/png"
+ data_file_name "rails.png"
+
+ association :assetable, :factory => :article
end
end