Skip to content
Permalink
Browse files

Add test for crawling error (404)

  • Loading branch information...
jigarius committed Apr 29, 2019
1 parent 85ccb0d commit f6b936204a220f08a57f1b196b1380da76b90b7b
Showing with 4 additions and 1 deletion.
  1. +1 −1 lib/sitediff/result.rb
  2. +3 −0 spec/fixtures/fixture_spec.rb
@@ -75,7 +75,7 @@ def log(verbose = true)
when STATUS_SUCCESS then
SiteDiff.log path, :diff_success, 'UNCHANGED'
when STATUS_ERROR then
SiteDiff.log path, :warn, "ERROR (#{error})"
SiteDiff.log path + " (#{error})", :warn, 'ERROR'
when STATUS_FAILURE then
SiteDiff.log path, :diff_failure, 'CHANGED'
puts Diff.terminal_diffy(before, after) if verbose
@@ -35,6 +35,9 @@
# Should report that File.html matches
expect(out).to include '[UNCHANGED] /IO.html'

# Should report that TracePoint.html matches
expect(out).to include '[ERROR] /TracePoint.html'

# Should report a diff of a different line
expect(out).to match(/^+.*<a href="#method-i-to_h"/)

0 comments on commit f6b9362

Please sign in to comment.
You can’t perform that action at this time.