test/helper.rb in paperclip-3.1.4 vs test/helper.rb in paperclip-3.2.0
- old
+ new
@@ -101,9 +101,16 @@
klass.has_attached_file :avatar, options
Paperclip.reset_duplicate_clash_check!
end
end
+def rebuild_meta_class_of obj, options = {}
+ (class << obj; self; end).tap do |metaklass|
+ metaklass.has_attached_file :avatar, options
+ Paperclip.reset_duplicate_clash_check!
+ end
+end
+
class FakeModel
attr_accessor :avatar_file_name,
:avatar_file_size,
:avatar_updated_at,
:avatar_content_type,