Created
December 16, 2011 18:09
-
-
Save dougal/1487192 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ClassificationSet < ActiveRecord::Base | |
mount_uploader :reference_file, ReferenceFileUploader | |
validates :reference_file, :presence => { :message => "must have a file selected" } | |
end | |
Factory.define :classification_set do |c| | |
c.images_zip { File.open(Rails.root.join('spec', 'file_fixtures', 'images.zip')) } | |
c.reference_file { File.open(Rails.root.join('spec', 'file_fixtures', 'reference_file.txt')) } | |
end | |
Factory(:classification_set) | |
# Failure/Error: classification_set = Factory(:classification_set) | |
# ActiveRecord::RecordInvalid: | |
# Validation failed: Reference file must have a file selected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment