Permalink
Browse files

fix should_validate_attachment_content_type macro

(cherry picked from commit 4db98fb37e32867541f28b7832ce8d28788fd62c)
  • Loading branch information...
1 parent 5318f7d commit f44ede70f849acf3ae3403cc1d5e1439fa0fac91 @lawrencepit lawrencepit committed with jyurek Feb 26, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 shoulda_macros/paperclip.rb
@@ -38,7 +38,7 @@ def should_validate_attachment_content_type name, options = {}
klass = self.name.gsub(/Test$/, '').constantize
valid = [options[:valid]].flatten
invalid = [options[:invalid]].flatten
- matcher = validate_attachment_presence(name).allows(valid).rejects(invalid)
+ matcher = validate_attachment_content_type(name).allowing(valid).rejecting(invalid)
should matcher.description do
assert_accepts(matcher, klass)
end

0 comments on commit f44ede7

Please sign in to comment.