Skip to content

Commit

Permalink
minor - improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoporreca committed Feb 7, 2020
1 parent e8f81dd commit 29ed4e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions spec/html-proofer/cache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def read_cache(cache_file)

# we expect no add...
expect_any_instance_of(HTMLProofer::Cache).to_not receive(:add)
# ...since we are mocking within_timeframe? to be true
# ...since we are mocking :within_timeframe? to be true
within = true
expect_any_instance_of(HTMLProofer::Cache).to receive(:within_timeframe?).and_return(within)

Expand All @@ -126,12 +126,11 @@ def read_cache(cache_file)
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)

# we expect an add...
expect_any_instance_of(HTMLProofer::Cache).to receive(:add).with('www.github.com', nil, 200)
# ...since we are mocking within_timeframe? to be true
# ...since we are mocking :within_timeframe? to be false
within = false
expect_any_instance_of(HTMLProofer::Cache).to receive(:within_timeframe?).and_return(within)

Expand Down

0 comments on commit 29ed4e7

Please sign in to comment.