minitap 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/.ruby CHANGED
@@ -8,8 +8,6 @@ copyrights:
8
8
  - holder: Rubyworks
9
9
  year: '2011'
10
10
  license: BSD-2-Clause
11
- replacements: []
12
- alternatives: []
13
11
  requirements:
14
12
  - name: tapout
15
13
  version: ! '>= 0.3.0'
@@ -31,26 +29,37 @@ requirements:
31
29
  - test
32
30
  development: true
33
31
  dependencies: []
32
+ alternatives: []
34
33
  conflicts: []
35
34
  repositories:
36
35
  - uri: git://github.com/rubyworks/minitap.git
37
36
  scm: git
38
37
  name: upstream
39
38
  resources:
40
- home: http://rubyworks.github.com/minitap
41
- docs: http://rubydoc.info/gems/minitap
42
- code: http://github.com/rubyworks/minitap
43
- bugs: http://github.com/rubyworks/minitap/issues
44
- mail: http://groups.google.com/group/rubyworks-mailinglist
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: []
45
54
  extra: {}
46
55
  load_path:
47
56
  - lib
48
57
  revision: 0
49
58
  summary: TAP-Y/J reporters for MiniTest
50
59
  title: MiniTap
51
- version: 0.3.3
60
+ version: 0.3.4
52
61
  name: minitap
53
62
  description: MiniTap provides a MiniTest TAP-Y/J report format suitable for use with
54
63
  TAPOUT.
55
64
  organization: rubyworks
56
- date: '2012-02-01'
65
+ date: '2012-05-02'
@@ -2,11 +2,11 @@
2
2
 
3
3
  == MiniTap
4
4
 
5
- Copyright:: (c) 2010 Thomas Sawyer, Rubyworks
5
+ Copyright:: (c) 2011 Rubyworks
6
6
  License:: BSD-2-Clause
7
7
  Website:: http://rubyworks.github.com/tapout
8
8
 
9
- Copyright 2011 Thomas Sawyer. All rights reserved.
9
+ Copyright 2011 Rubyworks. All rights reserved.
10
10
 
11
11
  Redistribution and use in source and binary forms, with or without
12
12
  modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,15 @@
1
1
  = RELEASE HISTORY
2
2
 
3
+ == 0.3.4 | 2012-05-01
4
+
5
+ This release simply fixes a misspelling that caused an error
6
+ when a test was skipped.
7
+
8
+ Changes:
9
+
10
+ * Fix misspelling of the word 'exception'. (#2 Corey O'Connor)
11
+
12
+
3
13
  == 0.3.3 | 2012-02-01
4
14
 
5
15
  This release adds support for the new 'stdout' and 'stderr' fields.
@@ -0,0 +1,95 @@
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
+
95
+
@@ -234,7 +234,7 @@ module MiniTest
234
234
 
235
235
  #
236
236
  def tapout_skip(suite, test, test_runner)
237
- e = test_runner.exeception
237
+ e = test_runner.exception
238
238
  e_file, e_line = location(test_runner.exception)
239
239
  r_file = e_file.sub(Dir.pwd+'/', '')
240
240
 
@@ -0,0 +1,5 @@
1
+ require 'minitap'
2
+ MiniTest::Unit.runner = MiniTest::TapJ.new
3
+
4
+ # TODO Support ENV['rpt'], but how to select other formats ?
5
+
@@ -0,0 +1,5 @@
1
+ require 'minitap'
2
+ MiniTest::Unit.runner = MiniTest::TapY.new
3
+
4
+ # TODO Support ENV['rpt'], but how to select other formats ?
5
+
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.3
4
+ version: 0.3.4
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-02-01 00:00:00.000000000 Z
12
+ date: 2012-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tapout
16
- requirement: &27848940 !ruby/object:Gem::Requirement
16
+ requirement: &20606060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *27848940
24
+ version_requirements: *20606060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: minitest
27
- requirement: &27848020 !ruby/object:Gem::Requirement
27
+ requirement: &20605600 !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: *27848020
35
+ version_requirements: *20605600
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: detroit
38
- requirement: &27846700 !ruby/object:Gem::Requirement
38
+ requirement: &20605060 !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: *27846700
46
+ version_requirements: *20605060
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: reap
49
- requirement: &27845960 !ruby/object:Gem::Requirement
49
+ requirement: &20604560 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *27845960
57
+ version_requirements: *20604560
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: qed
60
- requirement: &27844460 !ruby/object:Gem::Requirement
60
+ requirement: &20604060 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *27844460
68
+ version_requirements: *20604060
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ae
71
- requirement: &27841740 !ruby/object:Gem::Requirement
71
+ requirement: &20603560 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *27841740
79
+ version_requirements: *20603560
80
80
  description: MiniTap provides a MiniTest TAP-Y/J report format suitable for use with
81
81
  TAPOUT.
82
82
  email:
@@ -86,11 +86,14 @@ extensions: []
86
86
  extra_rdoc_files:
87
87
  - HISTORY.rdoc
88
88
  - README.rdoc
89
+ - QED.rdoc
89
90
  - COPYING.rdoc
90
91
  files:
91
92
  - .ruby
92
93
  - .yardopts
93
94
  - lib/minitap/ignore_callers.rb
95
+ - lib/minitap/tapj.rb
96
+ - lib/minitap/tapy.rb
94
97
  - lib/minitap.rb
95
98
  - spec/applique/ae.rb
96
99
  - spec/applique/cli.rb
@@ -98,6 +101,7 @@ files:
98
101
  - spec/minitap.rdoc
99
102
  - HISTORY.rdoc
100
103
  - README.rdoc
104
+ - QED.rdoc
101
105
  - COPYING.rdoc
102
106
  homepage: http://rubyworks.github.com/minitap
103
107
  licenses: