diff --git a/test/attachment_options_test.rb b/test/attachment_options_test.rb index 205ae334a..1ac8ea757 100644 --- a/test/attachment_options_test.rb +++ b/test/attachment_options_test.rb @@ -1,13 +1,8 @@ require './test/helper' class AttachmentOptionsTest < Test::Unit::TestCase - should "exist" do - Paperclip::AttachmentOptions - end - should "be a Hash" do - attachment_options = Paperclip::AttachmentOptions.new({}) - assert attachment_options.is_a?(Hash), "attachment_options is not a Hash" + assert_kind_of Hash, Paperclip::AttachmentOptions.new({}) end should "add a default empty validations" do @@ -24,7 +19,7 @@ class AttachmentOptionsTest < Test::Unit::TestCase end should "respond to []" do - Paperclip::AttachmentOptions.new({})[:foo] + assert Paperclip::AttachmentOptions.new({}).respond_to?(:[]) end should "deliver the specified options through []" do @@ -34,7 +29,7 @@ class AttachmentOptionsTest < Test::Unit::TestCase end should "respond to []=" do - Paperclip::AttachmentOptions.new({})[:foo] = "bar" + assert Paperclip::AttachmentOptions.new({}).respond_to?(:[]=) end should "remember options set with []=" do diff --git a/test/paperclip_test.rb b/test/paperclip_test.rb index ead0a9012..c11357c76 100644 --- a/test/paperclip_test.rb +++ b/test/paperclip_test.rb @@ -98,13 +98,6 @@ class Dummy2 < ActiveRecord::Base end end - context "An ActiveRecord model responding to has_attached_file" do - should "pass the options to Paperclip::AttachmentOptions.new" do - Paperclip::AttachmentOptions.expects(:new).with({"test" => "hash"}).returns(MockAttachmentOptions.new) - rebuild_model "test" => "hash" - end - end - context "An ActiveRecord model with an 'avatar' attachment" do setup do rebuild_model :path => "tmp/:class/omg/:style.:extension"