Sha256: b26fc81e40181d003583fb5b9ad21fb8cd2bad6686e2339f9ee5b89d2b3468a7
Contents?: true
Size: 969 Bytes
Versions: 13
Compression:
Stored size: 969 Bytes
Contents
module Woulda module AttachmentFu module Macros def should_have_attachment(options = {}) klass = model_class should_have_db_columns :size, :content_type, :filename if options[:content_type] == :image should_have_db_columns :height, :width end should "define AttachmentFu class methods" do # breakpoint class_modules = (class << klass; included_modules; end) assert class_modules.include?(Technoweenie::AttachmentFu::ClassMethods), "#{klass} doesn't define AttachmentFu class methods" end should "define AttachmentFu instance methods" do instance_modules = klass.included_modules assert instance_modules.include?(Technoweenie::AttachmentFu::InstanceMethods), "#{klass} doesn't define AttachmentFu instance methods" end end end end end
Version data entries
13 entries across 13 versions & 3 rubygems