minitap 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/.index ADDED
@@ -0,0 +1,66 @@
1
+ ---
2
+ type: ruby
3
+ revision: 2013
4
+ sources:
5
+ - var
6
+ authors:
7
+ - name: trans
8
+ email: transfire@gmail.com
9
+ organizations: []
10
+ requirements:
11
+ - version: ! '>= 0.3.0'
12
+ name: tapout
13
+ - name: minitest
14
+ - groups:
15
+ - build
16
+ development: true
17
+ name: detroit
18
+ - groups:
19
+ - build
20
+ development: true
21
+ name: reap
22
+ - groups:
23
+ - test
24
+ development: true
25
+ name: qed
26
+ - groups:
27
+ - test
28
+ development: true
29
+ name: ae
30
+ conflicts: []
31
+ alternatives: []
32
+ resources:
33
+ - type: home
34
+ uri: http://rubyworks.github.com/minitap
35
+ label: Homepage
36
+ - type: docs
37
+ uri: http://rubydoc.info/gems/minitap
38
+ label: Documentation
39
+ - type: code
40
+ uri: http://github.com/rubyworks/minitap
41
+ label: Source Code
42
+ - type: bugs
43
+ uri: http://github.com/rubyworks/minitap/issues
44
+ label: Issue Tracker
45
+ - type: mail
46
+ uri: http://groups.google.com/group/rubyworks-mailinglist
47
+ label: Mailing List
48
+ repositories:
49
+ - name: upstream
50
+ scm: git
51
+ uri: git://github.com/rubyworks/minitap.git
52
+ categories: []
53
+ paths:
54
+ load:
55
+ - lib
56
+ copyrights:
57
+ - holder: Rubyworks
58
+ year: '2011'
59
+ license: BSD-2-Clause
60
+ summary: TAP-Y/J reporters for MiniTest
61
+ title: MiniTap
62
+ version: 0.3.5
63
+ name: minitap
64
+ description: MiniTap provides a MiniTest TAP-Y/J report format suitable for use with
65
+ TAPOUT.
66
+ date: '2013-01-17'
data/.ruby CHANGED
@@ -1,65 +0,0 @@
1
- ---
2
- source:
3
- - var
4
- authors:
5
- - name: trans
6
- email: transfire@gmail.com
7
- copyrights:
8
- - holder: Rubyworks
9
- year: '2011'
10
- license: BSD-2-Clause
11
- requirements:
12
- - name: tapout
13
- version: ! '>= 0.3.0'
14
- - name: minitest
15
- - name: detroit
16
- groups:
17
- - build
18
- development: true
19
- - name: reap
20
- groups:
21
- - build
22
- development: true
23
- - name: qed
24
- groups:
25
- - test
26
- development: true
27
- - name: ae
28
- groups:
29
- - test
30
- development: true
31
- dependencies: []
32
- alternatives: []
33
- conflicts: []
34
- repositories:
35
- - uri: git://github.com/rubyworks/minitap.git
36
- scm: git
37
- name: upstream
38
- resources:
39
- - uri: http://rubyworks.github.com/minitap
40
- label: Website
41
- type: home
42
- - uri: http://rubydoc.info/gems/minitap
43
- type: docs
44
- - uri: http://github.com/rubyworks/minitap
45
- label: Source Code
46
- type: code
47
- - uri: http://github.com/rubyworks/minitap/issues
48
- label: Issue Tracker
49
- type: bugs
50
- - uri: http://groups.google.com/group/rubyworks-mailinglist
51
- label: Mailing List
52
- type: mail
53
- categories: []
54
- extra: {}
55
- load_path:
56
- - lib
57
- revision: 0
58
- summary: TAP-Y/J reporters for MiniTest
59
- title: MiniTap
60
- version: 0.3.4
61
- name: minitap
62
- description: MiniTap provides a MiniTest TAP-Y/J report format suitable for use with
63
- TAPOUT.
64
- organization: rubyworks
65
- date: '2012-05-02'
@@ -1,6 +1,16 @@
1
- = RELEASE HISTORY
1
+ # RELEASE HISTORY
2
2
 
3
- == 0.3.4 | 2012-05-01
3
+ ## 0.3.5 | 2013-01-17
4
+
5
+ This release adds a #record method to the TestRunner to accomodate
6
+ recent changes to MiniTest.
7
+
8
+ Changes:
9
+
10
+ * Add TestRunner#record method.
11
+
12
+
13
+ ## 0.3.4 | 2012-05-01
4
14
 
5
15
  This release simply fixes a misspelling that caused an error
6
16
  when a test was skipped.
@@ -10,7 +20,7 @@ Changes:
10
20
  * Fix misspelling of the word 'exception'. (#2 Corey O'Connor)
11
21
 
12
22
 
13
- == 0.3.3 | 2012-02-01
23
+ ## 0.3.3 | 2012-02-01
14
24
 
15
25
  This release adds support for the new 'stdout' and 'stderr' fields.
16
26
  As tests are run $stdout and $stderr are captured and included in
@@ -22,7 +32,7 @@ Changes:
22
32
  * Add support for stdout and stderr capturing.
23
33
 
24
34
 
25
- == 0.3.2 | 2011-11-08
35
+ ## 0.3.2 | 2011-11-08
26
36
 
27
37
  This release add support for the new TAP-Y/J 'class' field, and removes
28
38
  the class name from the message field. It also fixes a bug that
@@ -36,7 +46,7 @@ Changes:
36
46
  * Remove class name from message field.
37
47
 
38
48
 
39
- == 0.3.1 | 2011-10-18
49
+ ## 0.3.1 | 2011-10-18
40
50
 
41
51
  This release includes two basic improvements: better backtrace filtering,
42
52
  and file fields given relative to current working directory instead of
@@ -49,7 +59,7 @@ Changes:
49
59
  * Make file fields relative to working directory.
50
60
 
51
61
 
52
- == 0.3.0 | 2011-10-09
62
+ ## 0.3.0 | 2011-10-09
53
63
 
54
64
  Support version 3 of TAP-Y/J spec. This simply entailed renaming
55
65
  the `tally` document to `final`.
@@ -59,7 +69,7 @@ Changes:
59
69
  * Support revision 3 of TAP-Y/J.
60
70
 
61
71
 
62
- == 0.2.0 | 2011-10-07
72
+ ## 0.2.0 | 2011-10-07
63
73
 
64
74
  This release adjusts how the customer reporter classes
65
75
  should be used. It's actually a very minor release under
@@ -70,7 +80,7 @@ Changes:
70
80
  * Adjust usage documentation.
71
81
 
72
82
 
73
- == 0.1.0 | 2011-10-06
83
+ ## 0.1.0 | 2011-10-06
74
84
 
75
85
  This is the first release of MiniTap, a TAP-Y/J reporter
76
86
  for the MiniTest test framework.
@@ -0,0 +1,23 @@
1
+ BSD-2-Clause License
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice,
7
+ this list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright
10
+ notice, this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+
13
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
14
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
16
+ COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
17
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
22
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
+
@@ -1,10 +1,10 @@
1
- = COPYRIGHT NOTICES
1
+ # COPYRIGHT NOTICES
2
2
 
3
- == MiniTap
3
+ ## MiniTap
4
4
 
5
- Copyright:: (c) 2011 Rubyworks
6
- License:: BSD-2-Clause
7
- Website:: http://rubyworks.github.com/tapout
5
+ * Copyright: (c) 2011 Rubyworks
6
+ * License: BSD-2-Clause
7
+ * Website: http://rubyworks.github.com/tapout
8
8
 
9
9
  Copyright 2011 Rubyworks. All rights reserved.
10
10
 
@@ -30,11 +30,11 @@ Website:: http://rubyworks.github.com/tapout
30
30
  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
31
 
32
32
 
33
- == MiniTest Reporter
33
+ ## MiniTest Reporter
34
34
 
35
- Copyright:: (c) 2011 Alexander Kern
36
- License:: MIT
37
- Website:: https://github.com/CapnKernul/minitest-reporters
35
+ * Copyright: (c) 2011 Alexander Kern
36
+ * License: MIT
37
+ * Website: https://github.com/CapnKernul/minitest-reporters
38
38
 
39
39
  Copyright (c) 2011 Alexander Kern
40
40
 
File without changes
@@ -1,62 +1,60 @@
1
- = MiniTap
1
+ [Website](http://rubyworks.github.com/minitap) |
2
+ [Documentation](http://rubydoc.info/gems/minitap/frames) |
3
+ [Report Issue](http://github.com/rubyworks/minitap/issues) |
4
+ [Source Code](http://github.com/rubyworks/minitap)
5
+ ( [![Build Status](https://travis-ci.org/rubyworks/minitap.png)](https://travis-ci.org/rubyworks/minitap) )
2
6
 
3
- {Website}[http://rubyworks.github.com/minitap] |
4
- {Documentation}[http://rubydoc.info/gems/minitap/frames] |
5
- {Development}[http://github.com/rubyworks/minitap]
6
7
 
7
- {<img src="http://travis-ci.org/rubyworks/minitap.png" />}[http://travis-ci.org/rubyworks/minitap]
8
-
9
-
10
- == Description
8
+ # MiniTap
11
9
 
12
10
  The MiniTap project provides a TAP-Y and TAP-J output reporters for
13
11
  the MiniTest test framework --the test framework that comes standard
14
12
  with Ruby 1.9+.
15
13
 
16
- See {TAPOUT}[http://rubyworks.github.com/tapout] for more information about
14
+ See [TAPOUT](http://rubyworks.github.com/tapout) for more information about
17
15
  TAP-Y/J formats.
18
16
 
19
17
 
20
- == Usage
18
+ ## Usage
21
19
 
22
20
  MiniTest supports custom report format by setting `MiniTest::Unit.runner` to
23
21
  an instance of a custom runner class. In this case we want to set it to an
24
22
  instance of `MiniTest::TapY` or `MiniTest::TapJ`. So in your project's test
25
23
  helper script add, e.g.
26
24
 
27
- require 'minitap'
28
- MiniTest::Unit.runner = MiniTest::TapY.new
25
+ require 'minitap'
26
+ MiniTest::Unit.runner = MiniTest::TapY.new
29
27
 
30
28
  Now you may want to set this up so it is selectable. In which case use an
31
29
  environment variable.
32
30
 
33
- MiniTest::Unit.runner = \
34
- case ENV['rpt']
35
- when 'tapy'
36
- MiniTest::TapY.new
37
- when 'tapj'
38
- MiniTest::TapJ.new
39
- end
31
+ MiniTest::Unit.runner = \
32
+ case ENV['rpt']
33
+ when 'tapy'
34
+ MiniTest::TapY.new
35
+ when 'tapj'
36
+ MiniTest::TapJ.new
37
+ end
40
38
 
41
39
  Then you can do, e.g.
42
40
 
43
- $ rpt=tapy ruby test/some_test.rb
41
+ $ rpt=tapy ruby test/some_test.rb
44
42
 
45
43
  Now to do something interesting with the TAP-Y/J output, you will probably want
46
44
  to install `tapout`:
47
45
 
48
- $ gem install tapout
46
+ $ gem install tapout
49
47
 
50
48
  Then pipe the output to the `tapout` command, e.g.
51
49
 
52
- $ rpt=tapy ruby test/some_test.rb | tapout progressbar
50
+ $ rpt=tapy ruby test/some_test.rb | tapout progressbar
53
51
 
54
52
 
55
- == Copying
53
+ ## Copying
56
54
 
57
- Copyright (c) 2011 Thomas Sawyer
55
+ Copyright (c) 2011 Rubyworks
58
56
 
59
- Made available under the terms of the BSD-2-Clause license.
57
+ Made available under the terms of the *BSD-2-Clause* license.
60
58
 
61
59
  Portions of this program were drawn from Alexander Kern's
62
60
  MiniTest Reporter (c) 2011 Alexander Kern. Thanks Alexander
@@ -477,7 +477,10 @@ module MiniTest
477
477
  else [:error, exception]
478
478
  end
479
479
  end
480
-
480
+
481
+ def record(suite, method, assertions, time, error)
482
+ end
483
+
481
484
  private
482
485
 
483
486
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
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: 2012-05-02 00:00:00.000000000 Z
12
+ date: 2013-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tapout
16
- requirement: &20606060 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 0.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *20606060
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.3.0
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: minitest
27
- requirement: &20605600 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *20605600
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: detroit
38
- requirement: &20605060 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *20605060
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: reap
49
- requirement: &20604560 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *20604560
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: qed
60
- requirement: &20604060 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,10 +85,15 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *20604060
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: ae
71
- requirement: &20603560 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ! '>='
@@ -76,7 +101,12 @@ dependencies:
76
101
  version: '0'
77
102
  type: :development
78
103
  prerelease: false
79
- version_requirements: *20603560
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
80
110
  description: MiniTap provides a MiniTest TAP-Y/J report format suitable for use with
81
111
  TAPOUT.
82
112
  email:
@@ -84,25 +114,24 @@ email:
84
114
  executables: []
85
115
  extensions: []
86
116
  extra_rdoc_files:
87
- - HISTORY.rdoc
88
- - README.rdoc
89
- - QED.rdoc
90
- - COPYING.rdoc
117
+ - LICENSE.txt
118
+ - HISTORY.md
119
+ - README.md
120
+ - QED.md
121
+ - NOTICE.md
91
122
  files:
123
+ - .index
92
124
  - .ruby
93
125
  - .yardopts
94
126
  - lib/minitap/ignore_callers.rb
95
127
  - lib/minitap/tapj.rb
96
128
  - lib/minitap/tapy.rb
97
129
  - lib/minitap.rb
98
- - spec/applique/ae.rb
99
- - spec/applique/cli.rb
100
- - spec/fixtures/tapy.yml
101
- - spec/minitap.rdoc
102
- - HISTORY.rdoc
103
- - README.rdoc
104
- - QED.rdoc
105
- - COPYING.rdoc
130
+ - HISTORY.md
131
+ - README.md
132
+ - QED.md
133
+ - NOTICE.md
134
+ - LICENSE.txt
106
135
  homepage: http://rubyworks.github.com/minitap
107
136
  licenses:
108
137
  - BSD-2-Clause
@@ -124,8 +153,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
153
  version: '0'
125
154
  requirements: []
126
155
  rubyforge_project:
127
- rubygems_version: 1.8.11
156
+ rubygems_version: 1.8.24
128
157
  signing_key:
129
158
  specification_version: 3
130
159
  summary: TAP-Y/J reporters for MiniTest
131
160
  test_files: []
161
+ has_rdoc:
@@ -1 +0,0 @@
1
- require 'ae'
@@ -1,40 +0,0 @@
1
- require 'tapout'
2
-
3
- When 'Given a MiniTest testcase' do |text|
4
- @test = text
5
- end
6
-
7
- When 'Running it with the (((.*?))) format' do |type|
8
- File.open('test.rb', 'w'){ |f| f << test_helper(type) + "\n\n" + @test }
9
- @out = `ruby test.rb`
10
-
11
- #@stream = YAML.load_documents(@out) # b/c of bug in Ruby 1.8
12
- @stream = (
13
- s = []
14
- YAML.load_documents(@out){ |d| s << d }
15
- s
16
- )
17
- end
18
-
19
- #When '(((\w+))) reporter should run without error' do |format|
20
- # $stdin = StringIO.new(@tapy)
21
- # $stdout = StringIO.new(out = '')
22
- #
23
- # TapOut.cli(format)
24
- #end
25
-
26
- def test_helper(type)
27
- if type == 'TAP-Y' then
28
- %Q{
29
- require 'minitap'
30
- MiniTest::Unit.runner = MiniTest::TapY.new
31
- require 'minitest/autorun'
32
- }
33
- else
34
- %Q{
35
- require 'minitap'
36
- MiniTest::Unit.runner = MiniTest::TapJ.new
37
- require 'minitest/autorun'
38
- }
39
- end
40
- end
@@ -1,78 +0,0 @@
1
- ---
2
- type: suite
3
- start: '2011-10-06 18:48:08'
4
- count: 3
5
- seed: 36440
6
- rev: 2
7
- ---
8
- type: case
9
- subtype: ''
10
- label: ExampleTestCase
11
- level: 0
12
- ---
13
- type: test
14
- subtype: ''
15
- status: error
16
- label: test_error
17
- exception:
18
- message: ! 'RuntimeError:'
19
- file: example.rb
20
- line: 10
21
- snippet:
22
- - 8: ''
23
- - 9: ! ' def test_error'
24
- - 10: ! ' raise'
25
- - 11: ! ' end'
26
- - 12: ''
27
- backtrace:
28
- - example.rb:10
29
- time: 0.001054606
30
- ---
31
- type: test
32
- subtype: ''
33
- status: fail
34
- label: test_failing
35
- exception:
36
- message: ! "Expected: \"1\"\n Actual: \"2\""
37
- file: example.rb
38
- line: 14
39
- snippet:
40
- - 12: ''
41
- - 13: ! ' def test_failing'
42
- - 14: ! ' assert_equal(''1'', ''2'')'
43
- - 15: ! ' end'
44
- - 16: ''
45
- backtrace:
46
- - example.rb:14
47
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:456
48
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:103
49
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:88
50
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:88
51
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:88
52
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:73
53
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:73
54
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:73
55
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:146
56
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:72
57
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:48
58
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:47
59
- - /home/trans/com/programs/rubyworks/minitap/lib/minitap.rb:47
60
- time: 0.046170916
61
- ---
62
- type: test
63
- subtype: ''
64
- status: pass
65
- label: test_passing
66
- time: 1.04997403
67
- ---
68
- type: tally
69
- time: 1.000800203
70
- counts:
71
- total: 3
72
- pass: 1
73
- fail: 1
74
- error: 1
75
- omit: 0
76
- todo: 0
77
- ...
78
-
@@ -1,94 +0,0 @@
1
- = MiniTap
2
-
3
- Given a MiniTest testcase:
4
-
5
- class ExampleTestCase < MiniTest::Unit::TestCase
6
- def test_error
7
- raise
8
- end
9
-
10
- def test_failing
11
- assert_equal('1', '2')
12
- end
13
-
14
- def test_passing
15
- sleep 1
16
- assert_equal('1', '1')
17
- end
18
- end
19
-
20
- Running it with the TAP-Y format should work without error.
21
-
22
- The resulting document stream should exhibit the following
23
- characteristics.
24
-
25
- There should be six sections.
26
-
27
- @stream.size #=> 6
28
-
29
- The first should be a `suite` with a count of `3`.
30
-
31
- @stream.first['type'] #=> 'suite'
32
- @stream.first['count'] #=> 3
33
-
34
- The second should be `case` entry.
35
-
36
- @stream[1]['type'] #=> 'case'
37
- @stream[1]['label'] #=> 'ExampleTestCase'
38
- @stream[1]['level'] #=> 0
39
-
40
- The next three documents are the unit tests, which can occur in any order.
41
- There one that shoud have a status of `pass`, another of `fail` and the
42
- third of `error`.
43
-
44
- passing_test = @stream.find{ |d| d['type'] == 'test' && d['status'] == 'pass' }
45
- failing_test = @stream.find{ |d| d['type'] == 'test' && d['status'] == 'fail' }
46
- erring_test = @stream.find{ |d| d['type'] == 'test' && d['status'] == 'error' }
47
-
48
- The passing test should have the following charactersitics.
49
-
50
- passing_test['label'] #=> 'test_passing'
51
-
52
- The failing test should
53
-
54
- failing_test['label'] #=> "test_failing"
55
- failing_test['exception']['class'] #=> "MiniTest::Assertion"
56
- failing_test['exception']['file'] #=> "test.rb"
57
- failing_test['exception']['line'] #=> 13
58
- failing_test['exception']['source'] #=> "assert_equal('1', '2')"
59
-
60
- The failing test should also not have any mention of minitap in the
61
- backtrace.
62
-
63
- failing_test['exception']['backtrace'].each do |e|
64
- /minitap/.refute.match(e)
65
- end
66
-
67
- The erring test should
68
-
69
- erring_test['label'] #=> 'test_error'
70
- erring_test['exception']['class'] #=> 'RuntimeError'
71
- erring_test['exception']['file'] #=> 'test.rb'
72
- erring_test['exception']['line'] #=> 9
73
- erring_test['exception']['source'] #=> 'raise'
74
-
75
- The erring test should also not have any mention of minitap in the
76
- backtrace.
77
-
78
- erring_test['exception']['backtrace'].each do |e|
79
- /minitap/.refute.match(e)
80
- end
81
-
82
- The last should a `final` document.
83
-
84
- @stream.last['type'] #=> 'final'
85
-
86
- And it should have the following counts.
87
-
88
- @stream.last['counts']['total'] #=> 3
89
- @stream.last['counts']['error'] #=> 1
90
- @stream.last['counts']['fail'] #=> 1
91
- @stream.last['counts']['pass'] #=> 1
92
- @stream.last['counts']['omit'] #=> 0
93
- @stream.last['counts']['todo'] #=> 0
94
-