dohtest 0.1.16 → 0.1.17
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/doh/test/group_runner.rb +6 -2
- data/lib/doh/test/master_runner.rb +6 -2
- metadata +2 -2
@@ -37,7 +37,7 @@ class GroupRunner
|
|
37
37
|
if @config[:pre_group_callback]
|
38
38
|
if (!@config[:pre_group_callback].call())
|
39
39
|
@error_count += 1
|
40
|
-
@output.callback_failed(@config[:
|
40
|
+
@output.callback_failed(@config[:pre_group_callback].inspect)
|
41
41
|
end
|
42
42
|
end
|
43
43
|
rescue => error
|
@@ -48,7 +48,7 @@ class GroupRunner
|
|
48
48
|
def run_after_all
|
49
49
|
@group.after_all if @group.respond_to?(:after_all)
|
50
50
|
if @config[:post_group_callback]
|
51
|
-
if (!@config[:post_group_callback].call())
|
51
|
+
if (!@config[:post_group_callback].call(total_problems))
|
52
52
|
@error_count += 1
|
53
53
|
@output.callback_failed(@config[:post_group_callback].inspect)
|
54
54
|
end
|
@@ -154,6 +154,10 @@ class GroupRunner
|
|
154
154
|
@error_count += 1
|
155
155
|
@output.test_error(@group_name, test_name || @test_name, error)
|
156
156
|
end
|
157
|
+
|
158
|
+
def total_problems
|
159
|
+
@error_count + @assertions_failed
|
160
|
+
end
|
157
161
|
end
|
158
162
|
|
159
163
|
end
|
@@ -14,11 +14,15 @@ class MasterRunner
|
|
14
14
|
DohTest::require_paths(@config[:glob], @paths)
|
15
15
|
srand(@config[:seed])
|
16
16
|
@output.run_begin(@config)
|
17
|
+
total_problems = 0
|
17
18
|
TestGroup.descendants.each do |group_class|
|
18
|
-
|
19
|
+
runner = GroupRunner.new(group_class, @output, @config)
|
20
|
+
brink_hit = runner.run
|
21
|
+
total_problems += runner.total_problems
|
22
|
+
break if brink_hit
|
19
23
|
end
|
20
24
|
if @config[:post_all_callback]
|
21
|
-
if (!@config[:post_all_callback].call())
|
25
|
+
if (!@config[:post_all_callback].call(problems_occured))
|
22
26
|
@output.callback_failed(@config[:post_all_callback].inspect)
|
23
27
|
end
|
24
28
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dohtest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-05-
|
13
|
+
date: 2013-05-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: dohroot
|