From f0620919d00dbd74d31e6b48f62346d6090e88f7 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Shibuya Date: Tue, 31 Dec 2024 17:15:10 +0900 Subject: [PATCH] Remove old specs that are no longer relevant These specs originate from this one: https://github.com/carrierwaveuploader/carrierwave/commit/fe90e0522dc303ae1edf928047af463441b7bd5e#diff-139363042a1d27e5830373d80deb5a2f8e7afcb68e28be55a73ffbd587517c0dR55-R57 But it was implemented in a wrong way (without calling #image=). Also this assumption doesn't hold true after #2658. --- spec/orm/activerecord_spec.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/spec/orm/activerecord_spec.rb b/spec/orm/activerecord_spec.rb index c89252ae3..bf10f44aa 100644 --- a/spec/orm/activerecord_spec.rb +++ b/spec/orm/activerecord_spec.rb @@ -197,10 +197,6 @@ def reset_class(class_name) expect(@event.image).to be_an_instance_of(@uploader) end - it "should write nothing to the database, to prevent overridden filenames to fail because of unassigned attributes" do - expect(@event[:image]).to be_nil - end - it "should copy a file into the cache directory" do @event.image = stub_file('test.jpeg') expect(@event.image.current_path).to match(%r(^#{public_path('uploads/tmp')})) @@ -1291,10 +1287,6 @@ def filename expect(@event.images[0]).to be_an_instance_of(@uploader) end - it "should write nothing to the database, to prevent overridden filenames to fail because of unassigned attributes" do - expect(@event[:images]).to be_nil - end - it "should copy a file into into the cache directory" do @event.images = [stub_file('test.jpeg')] expect(@event.images[0].current_path).to match(%r(^#{public_path('uploads/tmp')}))