Commit e8edb60d authored by Mike Kozono's avatar Mike Kozono

Refactor: Rename file_exist? to file_exists?

parent 94d5c97a
......@@ -72,7 +72,7 @@ module Geo
# we don't absolutely have to.
#
# @return [Boolean] whether the file exists on disk or in remote storage
def file_exist?
def file_exists?
carrierwave_uploader.file.exists?
end
......@@ -90,7 +90,7 @@ module Geo
#
# @return [Boolean] whether it can generate a checksum
def checksummable?
carrierwave_uploader.file_storage? && file_exist?
carrierwave_uploader.file_storage? && file_exists?
end
end
end
......@@ -19,7 +19,7 @@ module Gitlab
def execute
return error("#{replicator.replicable_name} not found") unless recorded_file
return file_not_found(recorded_file) unless replicator.file_exist?
return file_not_found(recorded_file) unless replicator.file_exists?
return error('Checksum mismatch') unless matches_checksum?
success(replicator.carrierwave_uploader)
......
......@@ -182,7 +182,7 @@ RSpec.shared_examples 'a blob replicator' do
context 'when the file does not exist' do
it 'raises an error' do
allow(subject).to receive(:file_exist?).and_return(false)
allow(subject).to receive(:file_exists?).and_return(false)
expect { subject.calculate_checksum }.to raise_error('File is not checksummable')
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