From e8f81ddd691a687ccf27e45aad0812e366c46150 Mon Sep 17 00:00:00 2001 From: riccardoporreca Date: Fri, 7 Feb 2020 01:41:30 +0100 Subject: [PATCH] No extra empty line detected at block body beginning/end. --- spec/html-proofer/cache_spec.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/spec/html-proofer/cache_spec.rb b/spec/html-proofer/cache_spec.rb index 40b120ed..916a6143 100644 --- a/spec/html-proofer/cache_spec.rb +++ b/spec/html-proofer/cache_spec.rb @@ -110,9 +110,7 @@ def read_cache(cache_file) context 'within date' do let(:cache_file_name) { '.within_date.log' } - it 'does not write file if timestamp is within date' do - expect_any_instance_of(HTMLProofer::Cache).to receive(:write) # we expect no add... @@ -122,15 +120,12 @@ def read_cache(cache_file) expect_any_instance_of(HTMLProofer::Cache).to receive(:within_timeframe?).and_return(within) run_proofer(['www.github.com'], :links, cache: { timeframe: '30d', cache_file: cache_file_name }.merge(default_cache_options)) - end end context 'not within date' do let(:cache_file_name) { '.not_within_date.log' } - it 'does write file if timestamp is not within date' do - # mock within_timeframe expect_any_instance_of(HTMLProofer::Cache).to receive(:write) @@ -141,13 +136,11 @@ def read_cache(cache_file) expect_any_instance_of(HTMLProofer::Cache).to receive(:within_timeframe?).and_return(within) run_proofer(['www.github.com'], :links, cache: { timeframe: '4d', cache_file: cache_file_name }.merge(default_cache_options)) - end end context 'new url added' do let(:cache_file_name) { '.new_url.log' } - it 'does write file if a new URL is added' do # this is frozen to within 7 days of the log new_time = Time.local(2015, 10, 20, 12, 0, 0) @@ -166,9 +159,7 @@ def read_cache(cache_file) context 'recheck failure' do let(:cache_file_name) { '.recheck_failure.log' } - it 'does recheck failures, regardless of cache' do - expect_any_instance_of(HTMLProofer::Cache).to receive(:write) # we expect the same link to be readded... @@ -178,7 +169,6 @@ def read_cache(cache_file) expect_any_instance_of(HTMLProofer::Cache).to receive(:within_timeframe?).and_return(within) run_proofer(['http://www.foofoofoo.biz'], :links, cache: { timeframe: '30d', cache_file: cache_file_name }.merge(default_cache_options)) - end end end