html-proofer 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -1
- data/lib/html/proofer.rb +6 -1
- data/lib/html/proofer/version.rb +1 -1
- metadata +1 -1
data/Gemfile
CHANGED
data/lib/html/proofer.rb
CHANGED
@@ -6,6 +6,7 @@ module HTML
|
|
6
6
|
def initialize(src, opts={})
|
7
7
|
@srcDir = src
|
8
8
|
@options = {:ext => ".html"}.merge(opts)
|
9
|
+
@failedTests = []
|
9
10
|
end
|
10
11
|
|
11
12
|
def run
|
@@ -22,6 +23,10 @@ module HTML
|
|
22
23
|
end
|
23
24
|
end
|
24
25
|
end
|
26
|
+
|
27
|
+
if !@failedTests.empty?
|
28
|
+
raise "Failing tests for: {@failedTests}"
|
29
|
+
end
|
25
30
|
end
|
26
31
|
|
27
32
|
def self.create_nokogiri(path)
|
@@ -34,7 +39,7 @@ module HTML
|
|
34
39
|
|
35
40
|
def print_issues(klass, issues)
|
36
41
|
return if issues.empty?
|
37
|
-
|
42
|
+
@failedTests.push klass
|
38
43
|
issues.each do |issue|
|
39
44
|
$stderr.puts issue + "\n\n"
|
40
45
|
end
|
data/lib/html/proofer/version.rb
CHANGED