Commit e1951ed0 by Prem Sichanugrist

Remove unused `:validations` option

Fixes #786
parent 6c5fe19f
module Paperclip
class AttachmentOptions < Hash
def initialize(options)
options = {:validations => []}.merge(options)
options.each do |k, v|
self.[]=(k, v)
end
......
......@@ -5,19 +5,6 @@ class AttachmentOptionsTest < Test::Unit::TestCase
assert_kind_of Hash, Paperclip::AttachmentOptions.new({})
end
should "add a default empty validations" do
options = {:arbi => :trary}
expected = {:validations => []}.merge(options)
actual = Paperclip::AttachmentOptions.new(options).to_hash
assert_equal expected, actual
end
should "not override validations if passed to initializer" do
options = {:validations => "something"}
attachment_options = Paperclip::AttachmentOptions.new(options)
assert_equal "something", attachment_options[:validations]
end
should "respond to []" do
assert Paperclip::AttachmentOptions.new({}).respond_to?(:[])
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