Skip to content

Instantly share code, notes, and snippets.

@osiro
Created December 16, 2014 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osiro/f7f8bd267c6bdbc3ca75 to your computer and use it in GitHub Desktop.
Save osiro/f7f8bd267c6bdbc3ca75 to your computer and use it in GitHub Desktop.
FactoryGirl.define do
factory :agency do
#... other fields
profile_image { File.open(Rails.root.join('spec', 'support', 'files', 'image-600.jpeg')) }
banner_image { File.open(Rails.root.join('spec', 'support', 'files', 'image.jpeg')) }
end
FactoryGirl.define do
factory :agency do
#... other fields
trait :with_images do
profile_image { File.open(Rails.root.join('spec', 'support', 'files', 'image-600.jpeg')) }
banner_image { File.open(Rails.root.join('spec', 'support', 'files', 'image.jpeg')) }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment