tapout 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby +3 -4
- data/HISTORY.rdoc +22 -6
- data/PROFILE +1 -1
- data/TAP-YJ.md +9 -8
- data/lib/tapout/parsers/json.rb +1 -1
- data/lib/tapout/parsers/perl.rb +1 -1
- data/lib/tapout/parsers/yaml.rb +1 -1
- data/lib/tapout/reporters/abstract.rb +7 -1
- data/lib/tapout/reporters/breakdown_reporter.rb +1 -1
- data/lib/tapout/reporters/dot_reporter.rb +2 -0
- data/lib/tapout/reporters/outline_reporter.rb +8 -2
- data/lib/tapout/reporters/progress_reporter.rb +1 -1
- data/lib/tapout/reporters/tap_reporter.rb +2 -2
- data/lib/tapout/reporters/turn_reporter.rb +6 -4
- data/lib/tapout/version.rb +1 -1
- data/lib/tapout.yml +3 -4
- metadata +10 -10
data/.ruby
CHANGED
@@ -29,18 +29,17 @@ resources:
|
|
29
29
|
code: http://github.com/rubyworks/tapout
|
30
30
|
load_path:
|
31
31
|
- lib
|
32
|
-
extra:
|
33
|
-
manifest: MANIFEST
|
32
|
+
extra: {}
|
34
33
|
source:
|
35
34
|
- PROFILE
|
36
35
|
alternatives: []
|
37
36
|
revision: 0
|
38
37
|
name: tapout
|
39
38
|
title: TapOut
|
40
|
-
version: 0.3.
|
39
|
+
version: 0.3.1
|
41
40
|
summary: Progressive TAP Harness
|
42
41
|
description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
|
43
42
|
and output it in a variety of useful formats.
|
44
43
|
organization: RubyWorks
|
45
44
|
created: '2010-12-23'
|
46
|
-
date: '2011-10-
|
45
|
+
date: '2011-10-18'
|
data/HISTORY.rdoc
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
= RELEASE HISTORY
|
2
2
|
|
3
|
+
== 0.3.1 / 2011-10-18
|
4
|
+
|
5
|
+
This release fixes an error raised when no report format is explicitly specified.
|
6
|
+
Where as it is supposed to default to the `dot` reporter. It also adds initial
|
7
|
+
support for error/failure `class` field.
|
8
|
+
|
9
|
+
Changes:
|
10
|
+
|
11
|
+
* Fix default reporter issue. (Brad Murray) #1
|
12
|
+
* Add support for class field to Turn reporter.
|
13
|
+
|
3
14
|
|
4
15
|
== 0.3.0 / 2011-10-09
|
5
16
|
|
@@ -8,8 +19,13 @@ to the document types. The `final` document is the last document of a test suite
|
|
8
19
|
It takes the place of `tally`, which is now simply an optional running subtotal
|
9
20
|
document.
|
10
21
|
|
11
|
-
This release also makes some
|
12
|
-
base class and ports over all applicable reporters from
|
22
|
+
This release also makes some interface improvements to the `Reporters::Abstract`
|
23
|
+
base class and ports over all applicable reporters from the Turn project.
|
24
|
+
|
25
|
+
Changes:
|
26
|
+
|
27
|
+
* Use `final` instead of `tally` for last entry.
|
28
|
+
* Port Turn report formats.
|
13
29
|
|
14
30
|
|
15
31
|
== 0.2.3 / 2011-10-08
|
@@ -29,7 +45,7 @@ Fixed incorrect tally entry in breakdown reporter.
|
|
29
45
|
Changes:
|
30
46
|
|
31
47
|
* Fixed incorrect tally entry in breakdown reporter.
|
32
|
-
* Add
|
48
|
+
* Add integration specs for reporters.
|
33
49
|
|
34
50
|
|
35
51
|
== 0.2.1 / 2011-10-06
|
@@ -45,11 +61,11 @@ Changes:
|
|
45
61
|
|
46
62
|
== 0.2.0 / 2011-10-06
|
47
63
|
|
48
|
-
This
|
64
|
+
This release revises the specification a bit, primarily
|
49
65
|
changing the names of header and footer sections to more
|
50
|
-
semantically
|
66
|
+
semantically useful terms, suite and tally, respectively.
|
51
67
|
Also, a `rev` field has been added to the suite entries
|
52
|
-
to allow consuming apps to
|
68
|
+
to allow consuming apps to gracefully handle any future
|
53
69
|
changes.
|
54
70
|
|
55
71
|
Changes:
|
data/PROFILE
CHANGED
data/TAP-YJ.md
CHANGED
@@ -122,10 +122,10 @@ equality, e.g. <code>assert_equal(4,3)</code>, so `expected` would be `3` and
|
|
122
122
|
of information for a test framework to provide, so it is the most often
|
123
123
|
omitted.
|
124
124
|
|
125
|
-
A
|
125
|
+
A test SHOULD also have a `file` and `line` number for source file location.
|
126
126
|
This is the location of the test definition itself.
|
127
127
|
|
128
|
-
A
|
128
|
+
A test SHOULD provide the line of `source` code for the test.
|
129
129
|
This will be the line of code that `file` and `line` number references.
|
130
130
|
Unlike `snippet` lines, the source line should be stripped of whitespace.
|
131
131
|
|
@@ -136,12 +136,12 @@ the source line in the center. Or, it MAY be an ordered map of verbatim
|
|
136
136
|
and end wherever, but they MUST be consecutive and the source line MUST
|
137
137
|
be among them.
|
138
138
|
|
139
|
-
[EXPERIMENTAL] The `coverage` subsection MAY be provided,
|
140
|
-
fields: `file`, `line` and `code`. Where `file` specifies the source
|
141
|
-
targeted by the test, `line` specifies the line number, range of line
|
142
|
-
numbers (e.g. `1..4`) or an array of such
|
143
|
-
language construct being targeted. For example, `code`
|
144
|
-
if the test targets the `bar` method of the `Foo` class.
|
139
|
+
[EXPERIMENTAL] The `coverage` subsection MAY be provided, which can have three
|
140
|
+
optional fields: `file`, `line` and `code`. Where `file` specifies the source
|
141
|
+
file being targeted by the test, `line` specifies the line number, range of line
|
142
|
+
numbers (e.g. `1..4`) or an array of such line or array of line numbaer,
|
143
|
+
and `code` specifices the language construct being targeted. For example, `code`
|
144
|
+
might be `Foo#bar` if the test targets the `bar` method of the `Foo` class.
|
145
145
|
|
146
146
|
The `time` is the number of seconds that have elapsed since the
|
147
147
|
the suite start time.
|
@@ -175,6 +175,7 @@ omission.
|
|
175
175
|
(assertion fail) must_equal
|
176
176
|
1
|
177
177
|
2
|
178
|
+
class: EqualityAssertion
|
178
179
|
file: test/test_foo.rb
|
179
180
|
line: 50
|
180
181
|
source: 1.must_equal == v
|
data/lib/tapout/parsers/json.rb
CHANGED
data/lib/tapout/parsers/perl.rb
CHANGED
data/lib/tapout/parsers/yaml.rb
CHANGED
@@ -6,15 +6,21 @@ module TapOut
|
|
6
6
|
# Namespace for Report Formats.
|
7
7
|
module Reporters
|
8
8
|
|
9
|
+
#
|
10
|
+
DEAFULT_REPORTER = 'dot'
|
11
|
+
|
9
12
|
# Returns a Hash of name to reporter class.
|
10
13
|
def self.index
|
11
14
|
@index ||= {}
|
12
15
|
end
|
13
16
|
|
14
17
|
# Returns a reporter class given it's name or a unique abbreviation of it.
|
18
|
+
# If `name` is `nil` then the default dot reporter is returned.
|
15
19
|
def self.factory(name)
|
16
20
|
list = index.keys.abbrev
|
17
|
-
index[list[name]]
|
21
|
+
rptr = index[list[name || DEAFULT_REPORTER]]
|
22
|
+
raise ArgumentError, "Unrecognized reporter -- #{name.inspect}" unless rptr
|
23
|
+
rptr
|
18
24
|
end
|
19
25
|
|
20
26
|
# The Abstract class serves as a base class for all reporters. Reporters
|
@@ -43,6 +43,7 @@ module TapOut::Reporters
|
|
43
43
|
#backtrace = clean_backtrace(exception.backtrace)
|
44
44
|
$stdout.puts "#{i}. " + (e['label']).ansi(:red)
|
45
45
|
$stdout.puts
|
46
|
+
$stdout.puts " #{e['exception']['class']}" if e['exception']['class']
|
46
47
|
$stdout.puts " #{e['exception']['message']}"
|
47
48
|
$stdout.puts " #{e['exception']['file']}:#{e['exception']['line']}" #+ backtrace[0]
|
48
49
|
$stdout.puts code_snippet(e['exception'])
|
@@ -54,6 +55,7 @@ module TapOut::Reporters
|
|
54
55
|
#backtrace = clean_backtrace(exception.backtrace)
|
55
56
|
$stdout.puts "#{i}. " + (e['label']).ansi(:yellow)
|
56
57
|
$stdout.puts
|
58
|
+
$stdout.puts " #{e['exception']['class']}" if e['exception']['class']
|
57
59
|
$stdout.puts " #{e['exception']['message']}"
|
58
60
|
$stdout.puts " #{e['exception']['file']}:#{e['exception']['line']}" #+ backtrace[0..2].join(" \n")
|
59
61
|
$stdout.puts code_snippet(e['exception'])
|
@@ -25,9 +25,12 @@ module TapOut::Reporters
|
|
25
25
|
|
26
26
|
def fail(entry)
|
27
27
|
super(entry)
|
28
|
+
|
29
|
+
msg = entry['exception'].values_at('class', 'message').compact.join(' - ')
|
30
|
+
|
28
31
|
$stdout.puts "* " + entry['label'].ansi(:red) + " #{entry['source']}"
|
29
32
|
$stdout.puts
|
30
|
-
$stdout.puts " #{
|
33
|
+
$stdout.puts " #{msg}"
|
31
34
|
#$stdout.puts " " + ok.caller #clean_backtrace(exception.backtrace)[0]
|
32
35
|
$stdout.puts
|
33
36
|
$stdout.puts code_snippet(entry['exception'])
|
@@ -36,9 +39,12 @@ module TapOut::Reporters
|
|
36
39
|
|
37
40
|
def error(entry)
|
38
41
|
super(entry)
|
42
|
+
|
43
|
+
msg = entry['exception'].values_at('class', 'message').compact.join(' - ')
|
44
|
+
|
39
45
|
$stdout.puts "* " + entry['label'].ansi(:yellow) + " #{entry['source']}"
|
40
46
|
$stdout.puts
|
41
|
-
$stdout.puts " #{
|
47
|
+
$stdout.puts " #{msg}"
|
42
48
|
#$stdout.puts " " + ok.caller #clean_backtrace(exception.backtrace)[0..2].join(" \n")
|
43
49
|
$stdout.puts
|
44
50
|
$stdout.puts code_snippet(entry['exception'])
|
@@ -64,8 +64,8 @@ module TapOut::Reporters
|
|
64
64
|
|
65
65
|
body = []
|
66
66
|
body << "ERROR #{x['file']}:#{x['line']}" #clean_backtrace(exception.backtrace)[0..2].join(" \n")
|
67
|
-
|
68
|
-
body << "#{x['message']}"
|
67
|
+
body << "#{x['class']}: #{x['message']}"
|
68
|
+
#body << "#{x['message']}"
|
69
69
|
body << ""
|
70
70
|
body << code_snippet(entry)
|
71
71
|
body << ""
|
@@ -88,14 +88,16 @@ module TapOut
|
|
88
88
|
|
89
89
|
# TODO: TAP-Y/J needs a field for the error class
|
90
90
|
def error(doc)
|
91
|
-
|
92
|
-
|
93
|
-
backtrace
|
94
|
-
|
91
|
+
exception_class = doc['exception']['class'].to_s
|
92
|
+
message = doc['exception']['message'].to_s.ansi(:bold)
|
93
|
+
backtrace = "Exception `#{exception_class}' at " +
|
94
|
+
clean_backtrace(doc['exception']['backtrace'] || []).join("\n")
|
95
|
+
|
95
96
|
puts("#{ERROR}")
|
96
97
|
puts(message.tabto(8))
|
97
98
|
puts "STDERR:".tabto(8)
|
98
99
|
puts(backtrace.tabto(8))
|
100
|
+
|
99
101
|
show_captured_output
|
100
102
|
end
|
101
103
|
|
data/lib/tapout/version.rb
CHANGED
data/lib/tapout.yml
CHANGED
@@ -29,18 +29,17 @@ resources:
|
|
29
29
|
code: http://github.com/rubyworks/tapout
|
30
30
|
load_path:
|
31
31
|
- lib
|
32
|
-
extra:
|
33
|
-
manifest: MANIFEST
|
32
|
+
extra: {}
|
34
33
|
source:
|
35
34
|
- PROFILE
|
36
35
|
alternatives: []
|
37
36
|
revision: 0
|
38
37
|
name: tapout
|
39
38
|
title: TapOut
|
40
|
-
version: 0.3.
|
39
|
+
version: 0.3.1
|
41
40
|
summary: Progressive TAP Harness
|
42
41
|
description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
|
43
42
|
and output it in a variety of useful formats.
|
44
43
|
organization: RubyWorks
|
45
44
|
created: '2010-12-23'
|
46
|
-
date: '2011-10-
|
45
|
+
date: '2011-10-18'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ansi
|
16
|
-
requirement: &
|
16
|
+
requirement: &15919940 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *15919940
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: json
|
27
|
-
requirement: &
|
27
|
+
requirement: &15964400 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *15964400
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: detroit
|
38
|
-
requirement: &
|
38
|
+
requirement: &15957180 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *15957180
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: qed
|
49
|
-
requirement: &
|
49
|
+
requirement: &15391460 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *15391460
|
58
58
|
description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
|
59
59
|
and output it in a variety of useful formats.
|
60
60
|
email:
|