rubytest-summary 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 34e6256e5c84e38fd2dfeeb2db51280d531b5654
4
+ data.tar.gz: 093eb546a16b6072157370e54fcb05bc847e49db
5
+ SHA512:
6
+ metadata.gz: 659ec17425a3b9d302bafef67c8a5a3cda8338a315c7e10400385b70eed5e4fd31d9d225d33e2db8d9221b49cb267dc31c769a14fba11b6bafefe7f9eaad1172
7
+ data.tar.gz: 0b5b99e47bd54cfc69f40a6a6d0c565bafd81ad8c104e327f7f057d33d1828368bdf3de02bfd68e3ecf681299e5d9e9ad81a939f1f003309ed528860c8a4f086
data/.index ADDED
@@ -0,0 +1,45 @@
1
+ ---
2
+ revision: 2013
3
+ type: ruby
4
+ sources:
5
+ - Indexfile
6
+ - Gemfile
7
+ authors:
8
+ - name: trans
9
+ email: transfire@gmail.com
10
+ organizations: []
11
+ requirements:
12
+ - version: '>= 0.8.0'
13
+ name: rubytest
14
+ conflicts: []
15
+ alternatives: []
16
+ resources:
17
+ - type: home
18
+ uri: http://rubyworks.github.com/rubytest-summary
19
+ label: Homepage
20
+ - type: code
21
+ uri: http://github.com/rubyworks/rubytest-summary
22
+ label: Source Code
23
+ - type: mail
24
+ uri: http://groups.google.com/group/rubyworks-mailinglist
25
+ label: Mailing List
26
+ repositories:
27
+ - name: upstream
28
+ scm: git
29
+ uri: git@github.com:rubyworks/rubytest-summary.git
30
+ categories: []
31
+ copyrights:
32
+ - holder: RubyWorks
33
+ year: '2011'
34
+ license: BSD-2-Clause
35
+ customs: []
36
+ paths:
37
+ lib:
38
+ - lib
39
+ name: rubytest-summary
40
+ title: Rubytest Summary Test Report Format
41
+ version: 0.1.0
42
+ summary: Summary test report format for Rubytest.
43
+ description: This is a report format plugin for Rubytest.
44
+ created: '2011-07-23'
45
+ date: '2014-07-18'
@@ -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 AND
15
+ 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
+
@@ -0,0 +1,15 @@
1
+ # Rubytest Summary Report Format
2
+
3
+ This is a test report format plugin for Rubytest.
4
+
5
+
6
+ ## Requirements
7
+
8
+ * ANSI gem
9
+
10
+
11
+ ## Copyrights
12
+
13
+ Copyright 2011 Rubyworks. All rights reserved.
14
+
15
+
@@ -0,0 +1,145 @@
1
+ # encoding: UTF-8
2
+
3
+ module Test::Reporters
4
+
5
+ # Summary Reporter
6
+ class Summary < Abstract
7
+
8
+ #
9
+ SEP = ' '
10
+
11
+ #
12
+ def begin_suite(suite)
13
+ timer_reset
14
+ @tc = []
15
+ end
16
+
17
+ #
18
+ def begin_case(tc)
19
+ @tc << tc.to_s.split("\n").first
20
+ end
21
+
22
+ #
23
+ #def report_instance(instance)
24
+ # puts
25
+ # puts instance #"== #{concern.description}\n\n" unless concern.description.empty?
26
+ # #timer_reset
27
+ #end
28
+
29
+ #
30
+ #def begin_test(test)
31
+ # context = test.context
32
+ # if @instance != context
33
+ # @context = context
34
+ # puts
35
+ # puts " #{context}"
36
+ # puts
37
+ # end
38
+ #end
39
+
40
+ #
41
+ def pass(test)
42
+ print "PASS ".ansi(:green, :bold)
43
+ e = @tc + [test.to_s]
44
+ puts e.join(SEP).ansi(:green)
45
+ end
46
+
47
+ #
48
+ def fail(test, exception)
49
+ print "FAIL ".ansi(:red, :bold)
50
+ e = @tc + [test.to_s]
51
+ puts e.join(SEP).ansi(:red)
52
+ end
53
+
54
+ #
55
+ def error(test, exception)
56
+ print "ERROR ".ansi(:red, :bold)
57
+ e = @tc + [test.to_s]
58
+ puts e.join(SEP).ansi(:red)
59
+ end
60
+
61
+ #
62
+ def todo(test, exception)
63
+ print "TODO ".ansi(:yellow, :bold)
64
+ e = @tc + [test.to_s]
65
+ puts e.join(SEP).ansi(:yellow)
66
+ end
67
+
68
+ #
69
+ def omit(test)
70
+ print "OMIT ".ansi(:cyan, :bold)
71
+ e = @tc + [test.to_s]
72
+ puts e.join(SEP).ansi(:cyan)
73
+ end
74
+
75
+ #
76
+ def skip_test(test)
77
+ print "SKIP ".ansi(:blue, :bold)
78
+ e = @tc + [test.to_s]
79
+ puts e.join(SEP).ansi(:blue)
80
+ end
81
+
82
+ #
83
+ def end_case(test_case)
84
+ @tc.pop
85
+ end
86
+
87
+ #
88
+ def end_suite(suite)
89
+ puts
90
+
91
+ unless record[:pending].empty?
92
+ puts "PENDING:\n\n"
93
+ record[:pending].each do |test, exception|
94
+ puts " #{test}"
95
+ puts " #{file_and_line(exception)}"
96
+ puts
97
+ end
98
+ end
99
+
100
+ unless record[:fail].empty?
101
+ puts "FAILURES:\n\n"
102
+ record[:fail].each do |test, exception|
103
+ puts " #{test}"
104
+ puts " #{file_and_line(exception)}"
105
+ puts " #{exception}"
106
+ puts code(exception).to_s
107
+ #puts " #{exception.backtrace[0]}"
108
+ puts
109
+ end
110
+ end
111
+
112
+ unless record[:error].empty?
113
+ puts "ERRORS:\n\n"
114
+ record[:error].each do |test, exception|
115
+ puts " #{test}"
116
+ puts " #{file_and_line(exception)}"
117
+ puts " #{exception}"
118
+ puts code(exception).to_s
119
+ #puts " #{exception.backtrace[0]}"
120
+ puts
121
+ end
122
+ end
123
+
124
+ puts timestamp
125
+ puts
126
+ puts tally
127
+ end
128
+
129
+ private
130
+
131
+ #
132
+ def timer
133
+ secs = Time.now - @time
134
+ @time = Time.now
135
+ return "%0.5fs" % [secs.to_s]
136
+ end
137
+
138
+ #
139
+ def timer_reset
140
+ @time = Time.now
141
+ end
142
+
143
+ end
144
+
145
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubytest-summary
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - trans
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubytest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 0.8.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.8.0
27
+ description: This is a report format plugin for Rubytest.
28
+ email:
29
+ - transfire@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files:
33
+ - LICENSE.txt
34
+ - README.md
35
+ files:
36
+ - .index
37
+ - lib/rubytest/format/summary.rb
38
+ - README.md
39
+ - LICENSE.txt
40
+ homepage: http://rubyworks.github.com/rubytest-summary
41
+ licenses:
42
+ - BSD-2-Clause
43
+ metadata: {}
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 2.0.3
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: Summary test report format for Rubytest.
64
+ test_files: []
65
+ has_rdoc: