Permalink
Browse files

responding to code review comments

  • Loading branch information...
1 parent 675dd9a commit 1f989aef35e11268f357b2d3a2c5e0e3c0de8379 @Sporky023 Sporky023 committed Feb 3, 2012
Showing with 3 additions and 15 deletions.
  1. +3 −8 test/attachment_options_test.rb
  2. +0 −7 test/paperclip_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
View
@@ -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"

0 comments on commit 1f989ae

Please sign in to comment.