Commit 56a2cd69 by Mike Burns

Path collision checks are gone

parent 9f0bc344
......@@ -15,7 +15,6 @@ module Paperclip
define_getter
define_setter
define_query
check_for_path_clash
register_with_rake_tasks
add_active_record_callbacks
end
......@@ -66,10 +65,6 @@ module Paperclip
end
end
def check_for_path_clash
Paperclip.check_for_path_clash(@name, @options[:path], @klass.name)
end
def register_with_rake_tasks
Paperclip::Tasks::Attachments.add(@klass, @name, @options)
end
......
......@@ -19,10 +19,6 @@ class HasAttachedFileTest < Test::Unit::TestCase
assert_adding_attachment('avatar').defines_validation
end
should 'check for a path collision' do
assert_adding_attachment('avatar').checks_for_path_collision
end
should 'register the attachment with Paperclip::Tasks' do
assert_adding_attachment('avatar').registers_with_tasks
end
......@@ -66,17 +62,6 @@ class HasAttachedFileTest < Test::Unit::TestCase
end
end
def checks_for_path_collision
a_class = stub_class
Paperclip.stubs(:check_for_path_clash)
Paperclip::HasAttachedFile.define_on(a_class, @attachment_name, {})
assert_received(Paperclip, :check_for_path_clash) do |expect|
expect.with(@attachment_name, nil, a_class.name)
end
end
def registers_with_tasks
a_class = stub_class
Paperclip::Tasks::Attachments.stubs(:add)
......
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