Sha256: d21f1f913aedceeba046ed9224951196edae3481f95ab6aaa658aee4f70d351c
Contents?: true
Size: 664 Bytes
Versions: 17
Compression:
Stored size: 664 Bytes
Contents
require 'test/helper' class ValidateAttachmentPresenceMatcherTest < Test::Unit::TestCase context "validate_attachment_presence" do setup do reset_table("dummies") do |d| d.string :avatar_file_name end @dummy_class = reset_class "Dummy" @dummy_class.has_attached_file :avatar @matcher = self.class.validate_attachment_presence(:avatar) end should "reject a class with no validation" do assert_rejects @matcher, @dummy_class end should "accept a class with a validation" do @dummy_class.validates_attachment_presence :avatar assert_accepts @matcher, @dummy_class end end end
Version data entries
17 entries across 17 versions & 7 rubygems