Skip to content
This repository
Browse code

Remove unused `:validations` option

Fixes #786
  • Loading branch information...
commit e1951ed0ef7bff9494a548e4a3dd2ce98ee6dfea 1 parent 6c5fe19
Prem Sichanugrist authored March 30, 2012
1  lib/paperclip/attachment_options.rb
... ...
@@ -1,7 +1,6 @@
1 1
 module Paperclip
2 2
   class AttachmentOptions < Hash
3 3
     def initialize(options)
4  
-      options = {:validations => []}.merge(options)
5 4
       options.each do |k, v|
6 5
         self.[]=(k, v)
7 6
       end
13  test/attachment_options_test.rb
@@ -5,19 +5,6 @@ class AttachmentOptionsTest < Test::Unit::TestCase
5 5
     assert_kind_of Hash, Paperclip::AttachmentOptions.new({})
6 6
   end
7 7
 
8  
-  should "add a default empty validations" do
9  
-    options = {:arbi => :trary}
10  
-    expected = {:validations => []}.merge(options)
11  
-    actual = Paperclip::AttachmentOptions.new(options).to_hash
12  
-    assert_equal expected, actual
13  
-  end
14  
-
15  
-  should "not override validations if passed to initializer" do
16  
-    options = {:validations => "something"}
17  
-    attachment_options = Paperclip::AttachmentOptions.new(options)
18  
-    assert_equal "something", attachment_options[:validations]
19  
-  end
20  
-
21 8
   should "respond to []" do
22 9
     assert Paperclip::AttachmentOptions.new({}).respond_to?(:[])
23 10
   end

0 notes on commit e1951ed

Please sign in to comment.
Something went wrong with that request. Please try again.