test/attachment_test.rb in thoughtbot-paperclip-2.2.1 vs test/attachment_test.rb in thoughtbot-paperclip-2.2.2

- old
+ new

@@ -208,9 +208,20 @@ Paperclip::Test.expects(:make).with(@file, expected_params).returns(@file) end end end + context "An attachment with no processors defined" do + setup do + rebuild_model :processors => [], :styles => {:something => 1} + @dummy = Dummy.new + @file = StringIO.new("...") + end + should "raise when assigned to" do + assert_raises(RuntimeError){ @dummy.avatar = @file } + end + end + context "Assigning an attachment with post_process hooks" do setup do rebuild_model :styles => { :something => "100x100#" } Dummy.class_eval do before_avatar_post_process :do_before_avatar