Commit e703662f by Prem Sichanugrist

Make sure that Paperclip is working well with Rails 3.1.0.rc1

parent 73ee9b8f
......@@ -67,6 +67,7 @@ end
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
......@@ -85,6 +86,7 @@ def rebuild_class options = {}
include Paperclip::Glue
has_attached_file :avatar, options
end
Dummy.reset_column_information
end
class FakeModel
......
......@@ -193,7 +193,7 @@ class PaperclipTest < Test::Unit::TestCase
@dummy.valid?
end
should "not have an error when assigned a valid file" do
assert_equal 0, @dummy.errors.length, @dummy.errors.full_messages.join(", ")
assert_equal 0, @dummy.errors.size, @dummy.errors.full_messages.join(", ")
end
end
context "and assigned an invalid file" do
......@@ -202,7 +202,7 @@ class PaperclipTest < Test::Unit::TestCase
@dummy.valid?
end
should "have an error when assigned a valid file" do
assert @dummy.errors.length > 0
assert @dummy.errors.size > 0
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment