html-proofer 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/html/proofer.rb +3 -2
- data/lib/html/proofer/version.rb +1 -1
- data/spec/html/proofer/images_spec.rb +1 -1
- metadata +1 -1
data/lib/html/proofer.rb
CHANGED
@@ -18,7 +18,7 @@ module HTML
|
|
18
18
|
html = HTML::Proofer.create_nokogiri(path)
|
19
19
|
check = klass.new(path, html, @options)
|
20
20
|
check.run
|
21
|
-
self.print_issues(check.issues)
|
21
|
+
self.print_issues(klass, check.issues)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -32,8 +32,9 @@ module HTML
|
|
32
32
|
HTML::Proofer::Checks::Check.subclasses
|
33
33
|
end
|
34
34
|
|
35
|
-
def print_issues(issues)
|
35
|
+
def print_issues(klass, issues)
|
36
36
|
return if issues.empty?
|
37
|
+
raise "#{klass} has failing tests"
|
37
38
|
issues.each do |issue|
|
38
39
|
$stderr.puts issue + "\n\n"
|
39
40
|
end
|
data/lib/html/proofer/version.rb
CHANGED
@@ -31,7 +31,7 @@ describe "Image tests" do
|
|
31
31
|
|
32
32
|
it "fails for missing external images" do
|
33
33
|
externalImageFilepath = "#{FIXTURES_DIR}/missingImageExternal.html"
|
34
|
-
@imageCheck = Images.new(externalImageFilepath, HTML::Proofer.create_nokogiri(externalImageFilepath))
|
34
|
+
@imageCheck = Images.new(externalImageFilepath, HTML::Proofer.create_nokogiri(externalImageFilepath), {:longTests => true})
|
35
35
|
@imageCheck.run
|
36
36
|
@imageCheck.issues[0].should eq("spec/html/proofer/fixtures/missingImageExternal.html".blue + ": external image http://www.whatthehell does not exist")
|
37
37
|
end
|