spec/beaker/dsl/helpers/web_helpers_spec.rb in beaker-4.38.1 vs spec/beaker/dsl/helpers/web_helpers_spec.rb in beaker-4.39.0
- old
+ new
@@ -51,20 +51,20 @@
end
context ':cache_files_locally option is set' do
it 'caches if the file exists locally' do
options[:cache_files_locally] = true
- allow(File).to receive(:exists?).and_return(true)
+ allow(File).to receive(:exist?).and_return(true)
expect( logger ).to receive( :notify ).with( /^Already\ fetched\ / )
expect( subject ).not_to receive( :open )
subject.fetch_http_file( url, name, destdir )
end
it 'doesn\'t cache if the file doesn\'t exist locally' do
options[:cache_files_locally] = true
- allow(File).to receive(:exists?).and_return(false)
+ allow(File).to receive(:exist?).and_return(false)
expect( logger ).to receive( :notify ).with( /^Fetching/ ).ordered
expect( logger ).to receive( :notify ).with( /^\ \ and\ saving\ to\ / ).ordered
expect( subject ).to receive( :open )