test/helper.rb in paperclip-aws-1.4.1 vs test/helper.rb in paperclip-aws-1.6.0
- old
+ new
@@ -38,11 +38,11 @@
# def reset_dummy(options = {})
# reset_dummy(options)
# Dummy.new(:image => File.open("#{RAILS_ROOT}/test/fixtures/12k.png"))
# end
-def rebuild_model options = {}
+def rebuild_model(options = {})
ActiveRecord::Base.connection.create_table :dummies, :force => true do |table|
table.column :title, :string
table.column :other, :string
table.column :avatar_file_name, :string
table.column :avatar_content_type, :string
@@ -57,10 +57,10 @@
ActiveRecord::Base.send(:include, Paperclip::Glue)
Object.send(:remove_const, class_name) rescue nil
klass = Object.const_set(class_name, Class.new(ActiveRecord::Base))
klass.class_eval do
include Paperclip::Glue
- has_attached_file :avatar, options
+ has_attached_file :avatar, options
end
klass.reset_column_information
klass
end
\ No newline at end of file