Permalink
Browse files

Remove unused `:validations` option

Fixes #786
  • Loading branch information...
1 parent 6c5fe19 commit e1951ed0ef7bff9494a548e4a3dd2ce98ee6dfea @sikachu sikachu committed Mar 30, 2012
Showing with 0 additions and 14 deletions.
  1. +0 −1 lib/paperclip/attachment_options.rb
  2. +0 −13 test/attachment_options_test.rb
@@ -1,7 +1,6 @@
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

0 comments on commit e1951ed

Please sign in to comment.