Commit 384cb713 authored by Shinya Maeda's avatar Shinya Maeda

Fix spec

parent edd0eb18
......@@ -41,8 +41,10 @@ shared_examples "migrates" do |to_store:, from_store: nil|
it 'can access to the original file during migration' do
original_file = subject.file.path
allow(subject).to receive(:delete_migrated_file) { }
allow(subject).to receive(:delete_migrated_file) { } # Remove as a callback of :migrate
allow(subject).to receive(:record_upload) { } # Remove as a callback of :store (:record_upload)
expect(File.exist?(original_file)).to be_truthy
expect { migrate(to) }.not_to change { File.exist?(original_file) }
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment