Method: Paperclip::Shoulda::Matchers#validate_attachment_presence

Defined in:
lib/paperclip/matchers/validate_attachment_presence_matcher.rb

#validate_attachment_presence(name) ⇒ Object

Ensures that the given instance or class validates the presence of the given attachment.

describe User do

it { should validate_attachment_presence(:avatar) }

end



10
11
12
# File 'lib/paperclip/matchers/validate_attachment_presence_matcher.rb', line 10

def validate_attachment_presence name
  ValidateAttachmentPresenceMatcher.new(name)
end

Comments