From ea56ee2d9f917bb4fbc7fe6ad397989921033e34 Mon Sep 17 00:00:00 2001 From: Yohta Kimura Date: Wed, 13 Sep 2023 08:25:20 +0900 Subject: [PATCH] make test fail consistently --- spec/orm/activerecord_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/orm/activerecord_spec.rb b/spec/orm/activerecord_spec.rb index 71525aef6..1e4b29f39 100644 --- a/spec/orm/activerecord_spec.rb +++ b/spec/orm/activerecord_spec.rb @@ -1991,10 +1991,12 @@ def reload(*) end it "should not break uploading file" do - @event.image = stub_file('test.jpeg') + @event.image = stub_file('old.jpeg') + @event.image = stub_file('new.jpeg') @event.dup expect(@event.save).to be_truthy + expect(@event.image.path).to eq public_path('uploads/new.jpeg') expect(File.exist?(@event.image.path)).to be_truthy end end