Commit daefa873 by Scott Carleton Committed by Jon Yurek

failing spec for attachment definitions

parent 50770957
......@@ -62,6 +62,20 @@ class AttachmentRegistryTest < Test::Unit::TestCase
assert_equal expected_definitions, definitions
end
should "produce defintions for subclasses" do
expected_definitions = {
avatar: { yo: 'greeting' }
}
foo = Class.new
bar = Class.new(foo)
Paperclip::AttachmentRegistry.register(foo, :avatar, { yo: 'greeting' })
definitions = Paperclip::AttachmentRegistry.definitions_for(bar)
assert_equal expected_definitions, definitions
end
end
context '.clear' do
......
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