Created
December 27, 2012 13:21
-
-
Save takuyan/4388348 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
describe User do | |
it { should have_attached_file(:avatar) } | |
it { should validate_attachment_presence(:avatar) } | |
it { should validate_attachment_content_type(:avatar). | |
allowing('image/png', 'image/gif'). | |
rejecting('text/plain', 'text/xml') } | |
it { should validate_attachment_size(:avatar). | |
less_than(2.megabytes) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment