rubytest 0.7.0 → 0.8.0

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.
@@ -1,61 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- module Test::Reporters
4
-
5
- # Classic TAP Reporter
6
- #
7
- # This reporter conforms to v12 of TAP. It could do with some
8
- # imporvements yet, and eventually upgraded to v13 of standard.
9
- class Tap < Abstract
10
-
11
- #
12
- def begin_suite(suite)
13
- @start_time = Time.now
14
- @i = 0
15
- @n = total_count(suite)
16
- puts "1..#{@n}"
17
- end
18
-
19
- def begin_test(test)
20
- @i += 1
21
- end
22
-
23
- #
24
- def pass(test)
25
- puts "ok #{@i} - #{test}"
26
- end
27
-
28
- #
29
- def fail(test, exception)
30
- puts "not ok #{@i} - #{test}"
31
- puts " FAIL #{exception.class}"
32
- puts " #{exception}"
33
- puts " #{clean_backtrace(exception)[0]}"
34
- end
35
-
36
- #
37
- def error(test, exception)
38
- puts "not ok #{@i} - #{test}"
39
- puts " ERROR #{exception.class}"
40
- puts " #{exception}"
41
- puts " " + clean_backtrace(exception).join("\n ")
42
- end
43
-
44
- #
45
- def todo(test, exception)
46
- puts "not ok #{@i} - #{test}"
47
- puts " PENDING"
48
- puts " #{clean_backtrace(exception)[1]}"
49
- end
50
-
51
- #
52
- def omit(test, exception)
53
- puts "ok #{@i} - #{test}"
54
- puts " OMIT"
55
- puts " #{clean_backtrace(exception)[1]}"
56
- end
57
-
58
- end
59
-
60
- end
61
-
@@ -1,57 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- module Test::Reporters
4
-
5
- # TAP-J Reporter
6
- #
7
- class Tapj < AbstractHash
8
-
9
- REVISION = 5
10
-
11
- #
12
- def initialize(runner)
13
- require 'json'
14
- super(runner)
15
- end
16
-
17
- #
18
- def begin_suite(suite)
19
- hash = super(suite)
20
- hash['rev'] = REVISION
21
- puts hash.to_json
22
- end
23
-
24
- #
25
- def begin_case(test_case)
26
- puts super(test_case).to_json
27
- end
28
-
29
- #
30
- def pass(test) #, backtrace=nil)
31
- puts super(test).to_json
32
- end
33
-
34
- #
35
- def fail(test, exception)
36
- puts super(test, exception).to_json
37
- end
38
-
39
- #
40
- def error(test, exception)
41
- puts super(test, exception).to_json
42
- end
43
-
44
- #
45
- def todo(test, exception)
46
- puts super(test, exception).to_json
47
- end
48
-
49
- #
50
- def end_suite(suite)
51
- puts super(suite).to_json
52
- puts "..."
53
- end
54
-
55
- end
56
-
57
- end
@@ -1,62 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- module Test::Reporters
4
-
5
- # TAP-Y Reporter
6
- #
7
- class Tapy < AbstractHash
8
-
9
- REVISION = 5
10
-
11
- #
12
- def initialize(runner)
13
- require 'json'
14
- super(runner)
15
- end
16
-
17
- #
18
- def begin_suite(suite)
19
- hash = super(suite)
20
- hash['rev'] = REVISION
21
- puts hash.to_json
22
- end
23
-
24
- #
25
- def begin_case(test_case)
26
- puts super(test_case).to_yaml
27
- end
28
-
29
- #
30
- def pass(test) #, backtrace=nil)
31
- puts super(test).to_yaml
32
- end
33
-
34
- #
35
- def fail(test, exception)
36
- puts super(test, exception).to_yaml
37
- end
38
-
39
- #
40
- def error(test, exception)
41
- puts super(test, exception).to_yaml
42
- end
43
-
44
- #
45
- def todo(test, exception)
46
- puts super(test, exception).to_yaml
47
- end
48
-
49
- #
50
- def omit(test, exception)
51
- puts super(test, exception).to_yaml
52
- end
53
-
54
- #
55
- def end_suite(suite)
56
- puts super(suite).to_yaml
57
- puts "..."
58
- end
59
-
60
- end
61
-
62
- end