Skip to content

Commit 4a9a7ce

Browse files
committed
REW-2045 - fixes failing spec due to alias_method
1 parent 8a3fa9b commit 4a9a7ce

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/csv2db/config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def local_storage_host
1616
end
1717

1818
def file_attachment_name
19-
@file_attachment_name ||= :csv_attachment
19+
@file_attachment_name ||= :file_attachment
2020
end
2121
end
2222
end

spec/models/concerns/csv2db/import_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ class TestModel < ActiveRecord::Base
120120

121121
before do
122122
allow(TestModel).to receive(:has_one_attached)
123+
allow(TestModel).to receive(:alias_method)
124+
.with(:file_attachment, :file_attachment).and_return(nil)
123125
TestModel.include(Csv2db::ActiveStorageAdapter)
124126
allow(subject).to receive(:file_attachment).and_return(attachment_spy)
125127
end

0 commit comments

Comments
 (0)