turn 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ 'Software'), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
@@ -0,0 +1,56 @@
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the GPL
3
+ version 2 (see the file GPL), or the conditions below:
4
+
5
+ 1. You may make and give away verbatim copies of the source form of the
6
+ software without restriction, provided that you duplicate all of the
7
+ original copyright notices and associated disclaimers.
8
+
9
+ 2. You may modify your copy of the software in any way, provided that
10
+ you do at least ONE of the following:
11
+
12
+ a) place your modifications in the Public Domain or otherwise
13
+ make them Freely Available, such as by posting said
14
+ modifications to Usenet or an equivalent medium, or by allowing
15
+ the author to include your modifications in the software.
16
+
17
+ b) use the modified software only within your corporation or
18
+ organization.
19
+
20
+ c) give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
+
23
+ d) make other distribution arrangements with the author.
24
+
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
+
28
+ a) distribute the binaries and library files of the software,
29
+ together with instructions (in the manual page or equivalent)
30
+ on where to get the original distribution.
31
+
32
+ b) accompany the distribution with the machine-readable source of
33
+ the software.
34
+
35
+ c) give non-standard binaries non-standard names, with
36
+ instructions on where to get the original software distribution.
37
+
38
+ d) make other distribution arrangements with the author.
39
+
40
+ 4. You may modify and include the part of the software into any other
41
+ software (possibly commercial). But some files in the distribution
42
+ are not written by the author, so that they are not under these terms.
43
+
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
46
+
47
+ 5. The scripts and library files supplied as input to or produced as
48
+ output from the software do not automatically fall under the
49
+ copyright of the software, but belong to whomever generated them,
50
+ and may be sold commercially, and may be aggregated with this
51
+ software.
52
+
53
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
+ PURPOSE.
@@ -4,8 +4,10 @@ if RUBY_VERSION < "1.9"
4
4
  require 'test/unit'
5
5
  else
6
6
  require 'minitest/unit'
7
+ require 'test/unit'
7
8
  end
8
9
 
10
+
9
11
  #
10
12
  def turn(*args)
11
13
  `ruby -Ilib bin/turn -Ilib #{args.join(' ')} 2>&1`
@@ -16,6 +18,10 @@ def turn2(*args)
16
18
  `ruby -Ilib bin/turn -Ilib #{args.join(' ')}`
17
19
  end
18
20
 
21
+ def turn_with_term(term, *args)
22
+ `TERM="#{term}" ruby -Ilib bin/turn -Ilib #{args.join(' ')} 2>&1`
23
+ end
24
+
19
25
  #
20
26
  def setup_test(framework, required=false, name=nil)
21
27
  text = ''
@@ -84,8 +90,9 @@ end
84
90
  #
85
91
  def setup_minitest_autorun
86
92
  text = <<-HERE
87
- require 'minitest/unit'
93
+ require 'turn'
88
94
  MiniTest::Unit.autorun
95
+ #require 'minitest/unit'
89
96
  class TestTest < MiniTest::Unit::TestCase
90
97
  def test_sample_pass
91
98
  assert_equal(1,1)
@@ -95,3 +102,21 @@ end
95
102
  save_test(text, 'minitest_autorun_test.rb')
96
103
  end
97
104
 
105
+
106
+ def setup_minitest_autorun_with_trace
107
+ text = <<-HERE
108
+ #require 'minitest/unit'
109
+ #require 'rubygems'
110
+ require 'turn'
111
+ MiniTest::Unit.autorun
112
+ Turn.config do |c|
113
+ c.trace = true
114
+ end
115
+ class TestTest < MiniTest::Unit::TestCase
116
+ def test_sample_pass
117
+ assert_equal(0,1)
118
+ end
119
+ end
120
+ HERE
121
+ save_test(text, 'minitest_autorun_test_with_fail.rb')
122
+ end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/helper.rb'
1
+ require File.expand_path(File.dirname(__FILE__)) + '/helper.rb'
2
2
 
3
3
  # Test on Ruby 1.9+
4
4
  if RUBY_VERSION >= '1.9'
@@ -11,6 +11,27 @@ if RUBY_VERSION >= '1.9'
11
11
  assert result.index('PASS')
12
12
  end
13
13
 
14
+ def test_ruby19_minitest_color
15
+ term, stdout = ENV['TERM'], $stdout
16
+ $stdout = $stdout.dup
17
+ def $stdout.tty?
18
+ true
19
+ end
20
+ ENV['TERM'] = 'xterm'
21
+ assert_equal true, Turn::Colorize.colorize?
22
+ ENV['TERM'] = 'dumb'
23
+ assert_equal false, Turn::Colorize.colorize?
24
+ ENV['TERM'] = nil
25
+ assert_equal false, Turn::Colorize.colorize?
26
+ ENV['TERM'] = 'xterm'
27
+ def $stdout.tty?
28
+ false
29
+ end
30
+ assert_equal false, Turn::Colorize.colorize?
31
+ ensure
32
+ ENV['TERM'], $stdout = term, stdout
33
+ end
34
+
14
35
  def test_ruby19_minitest_force
15
36
  setup_test('MiniTest')
16
37
  result = turn '--minitest tmp/test.rb'
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/helper.rb'
1
+ require File.expand_path(File.dirname(__FILE__)) + '/helper.rb'
2
2
 
3
3
  class TestReporters < Test::Unit::TestCase
4
4
 
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/helper.rb'
1
+ require File.expand_path(File.dirname(__FILE__)) + '/helper.rb'
2
2
 
3
3
  class TestRunners < Test::Unit::TestCase
4
4
 
@@ -35,11 +35,20 @@ class TestRunners < Test::Unit::TestCase
35
35
  def test_autorun
36
36
  file = setup_minitest_autorun
37
37
  result = `ruby -Ilib #{file} 2>&1`
38
- assert result.index('0 failures')
39
- assert result.index('0 errors')
38
+ assert result.index('fail: 0')
39
+ assert result.index('error: 0')
40
40
  end
41
41
 
42
- end
42
+ def test_autorun_with_trace
43
+ file = setup_minitest_autorun_with_trace
44
+
45
+ result = `ruby -Ilib #{file} 2>&1`
46
+ assert result.index('fail: 1'), 'fail is not 1'
47
+ assert result.index('error: 0'), 'error is not 0'
43
48
 
49
+ # TODO: the backtrace is empty, why?
50
+ #assert result.scan(/\.rb:\d+:in/).length > 1
51
+ end
52
+ end
44
53
  end
45
54
 
@@ -2,48 +2,39 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{turn}
5
- s.version = "0.8.1"
5
+ s.version = "0.8.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Tim Pease"]
9
- s.date = %q{2010-09-09}
10
- s.default_executable = %q{turn}
11
- s.description = %q{TURN is a new way to view Test::Unit results. With longer running tests, it
12
- can be very frustrating to see a failure (....F...) and then have to wait till
13
- all the tests finish before you can see what the exact failure was. TURN
14
- displays each test on a separate line with failures being displayed
15
- immediately instead of at the end of the tests.
16
-
17
- If you have the 'ansi' gem installed, then TURN output will be displayed in
18
- wonderful technicolor (but only if your terminal supports ANSI color codes).
19
- Well, the only colors are green and red, but that is still color.}
8
+ s.authors = [%q{Tim Pease}]
9
+ s.date = %q{2011-10-10}
10
+ s.description = %q{}
20
11
  s.email = %q{tim.pease@gmail.com}
21
- s.executables = ["turn"]
22
- s.extra_rdoc_files = ["History.txt", "README.txt", "Release.txt", "Version.txt", "bin/turn"]
23
- s.files = ["History.txt", "README.txt", "Rakefile", "Release.txt", "Version.txt", "bin/turn", "demo/test_autorun_minitest.rb", "demo/test_autorun_testunit.rb", "demo/test_sample.rb", "demo/test_sample2.rb", "lib/turn.rb", "lib/turn/autorun/minitest.rb", "lib/turn/autorun/testunit.rb", "lib/turn/bin.rb", "lib/turn/colorize.rb", "lib/turn/command.rb", "lib/turn/components/case.rb", "lib/turn/components/method.rb", "lib/turn/components/suite.rb", "lib/turn/controller.rb", "lib/turn/core_ext.rb", "lib/turn/reporter.rb", "lib/turn/reporters/cue_reporter.rb", "lib/turn/reporters/dot_reporter.rb", "lib/turn/reporters/marshal_reporter.rb", "lib/turn/reporters/outline_reporter.rb", "lib/turn/reporters/pretty_reporter.rb", "lib/turn/reporters/progress_reporter.rb", "lib/turn/runners/crossrunner.rb", "lib/turn/runners/isorunner.rb", "lib/turn/runners/loadrunner.rb", "lib/turn/runners/minirunner.rb", "lib/turn/runners/solorunner.rb", "lib/turn/runners/testrunner.rb", "test/helper.rb", "test/runner", "test/test_framework.rb", "test/test_reporters.rb", "test/test_runners.rb"]
12
+ s.executables = [%q{turn}]
13
+ s.extra_rdoc_files = [%q{History.txt}, %q{NOTICE.txt}, %q{Release.txt}, %q{Version.txt}, %q{bin/turn}, %q{license/GPLv2.txt}, %q{license/MIT-LICENSE.txt}, %q{license/RUBY-LICENSE.txt}]
14
+ s.files = [%q{.travis.yml}, %q{Gemfile}, %q{History.txt}, %q{NOTICE.txt}, %q{README.md}, %q{Rakefile}, %q{Release.txt}, %q{Version.txt}, %q{bin/turn}, %q{demo/test_autorun_minitest.rb}, %q{demo/test_autorun_testunit.rb}, %q{demo/test_counts.rb}, %q{demo/test_sample.rb}, %q{demo/test_sample2.rb}, %q{lib/turn.rb}, %q{lib/turn/autoload.rb}, %q{lib/turn/autorun/minitest.rb}, %q{lib/turn/autorun/minitest0.rb}, %q{lib/turn/autorun/testunit.rb}, %q{lib/turn/autorun/testunit0.rb}, %q{lib/turn/bin.rb}, %q{lib/turn/colorize.rb}, %q{lib/turn/command.rb}, %q{lib/turn/components/case.rb}, %q{lib/turn/components/method.rb}, %q{lib/turn/components/suite.rb}, %q{lib/turn/controller.rb}, %q{lib/turn/core_ext.rb}, %q{lib/turn/reporter.rb}, %q{lib/turn/reporters/cue_reporter.rb}, %q{lib/turn/reporters/dot_reporter.rb}, %q{lib/turn/reporters/marshal_reporter.rb}, %q{lib/turn/reporters/outline_reporter.rb}, %q{lib/turn/reporters/pretty_reporter.rb}, %q{lib/turn/reporters/progress_reporter.rb}, %q{lib/turn/runners/crossrunner.rb}, %q{lib/turn/runners/isorunner.rb}, %q{lib/turn/runners/loadrunner.rb}, %q{lib/turn/runners/minirunner.rb}, %q{lib/turn/runners/solorunner.rb}, %q{lib/turn/runners/testrunner.rb}, %q{lib/turn/version.rb}, %q{license/GPLv2.txt}, %q{license/MIT-LICENSE.txt}, %q{license/RUBY-LICENSE.txt}, %q{test/helper.rb}, %q{test/runner}, %q{test/test_framework.rb}, %q{test/test_reporters.rb}, %q{test/test_runners.rb}, %q{turn.gemspec}]
24
15
  s.homepage = %q{http://gemcutter.org/gems/turn}
25
- s.rdoc_options = ["--main", "README.txt"]
26
- s.require_paths = ["lib"]
27
- s.rubyforge_project = %q{codeforpeople}
28
- s.rubygems_version = %q{1.5.2}
16
+ s.rdoc_options = [%q{--main}, %q{README.md}]
17
+ s.require_paths = [%q{lib}]
18
+ s.rubyforge_project = %q{turn}
19
+ s.rubygems_version = %q{1.8.6}
29
20
  s.summary = %q{Test::Unit Reporter (New) -- new output format for Test::Unit}
30
- s.test_files = ["test/test_framework.rb", "test/test_reporters.rb", "test/test_runners.rb"]
21
+ s.test_files = [%q{test/test_framework.rb}, %q{test/test_reporters.rb}, %q{test/test_runners.rb}]
31
22
 
32
23
  if s.respond_to? :specification_version then
33
24
  s.specification_version = 3
34
25
 
35
26
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
36
- s.add_runtime_dependency(%q<ansi>, [">= 1.2.2"])
37
- s.add_development_dependency(%q<bones-git>, [">= 1.2.0"])
38
- s.add_development_dependency(%q<bones>, [">= 3.4.7"])
27
+ s.add_runtime_dependency(%q<ansi>, [">= 0"])
28
+ s.add_development_dependency(%q<bones-git>, [">= 1.2.4"])
29
+ s.add_development_dependency(%q<bones>, [">= 3.7.1"])
39
30
  else
40
- s.add_dependency(%q<ansi>, [">= 1.2.2"])
41
- s.add_dependency(%q<bones-git>, [">= 1.2.0"])
42
- s.add_dependency(%q<bones>, [">= 3.4.7"])
31
+ s.add_dependency(%q<ansi>, [">= 0"])
32
+ s.add_dependency(%q<bones-git>, [">= 1.2.4"])
33
+ s.add_dependency(%q<bones>, [">= 3.7.1"])
43
34
  end
44
35
  else
45
- s.add_dependency(%q<ansi>, [">= 1.2.2"])
46
- s.add_dependency(%q<bones-git>, [">= 1.2.0"])
47
- s.add_dependency(%q<bones>, [">= 3.4.7"])
36
+ s.add_dependency(%q<ansi>, [">= 0"])
37
+ s.add_dependency(%q<bones-git>, [">= 1.2.4"])
38
+ s.add_dependency(%q<bones>, [">= 3.7.1"])
48
39
  end
49
40
  end
metadata CHANGED
@@ -1,95 +1,69 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: turn
3
- version: !ruby/object:Gem::Version
4
- hash: 59
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 8
9
- - 2
10
- version: 0.8.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.3
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Tim Pease
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-03-31 00:00:00 -06:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-10-10 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: ansi
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2153736940 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 27
30
- segments:
31
- - 1
32
- - 2
33
- - 2
34
- version: 1.2.2
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
35
22
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: bones-git
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2153736940
25
+ - !ruby/object:Gem::Dependency
26
+ name: bones-git
27
+ requirement: &2153735960 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 23
46
- segments:
47
- - 1
48
- - 2
49
- - 4
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
50
32
  version: 1.2.4
51
33
  type: :development
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: bones
55
34
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2153735960
36
+ - !ruby/object:Gem::Dependency
37
+ name: bones
38
+ requirement: &2153735420 !ruby/object:Gem::Requirement
57
39
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 21
62
- segments:
63
- - 3
64
- - 6
65
- - 5
66
- version: 3.6.5
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 3.7.1
67
44
  type: :development
68
- version_requirements: *id003
69
- description: |-
70
- TURN is a new way to view Test::Unit results. With longer running tests, it
71
- can be very frustrating to see a failure (....F...) and then have to wait till
72
- all the tests finish before you can see what the exact failure was. TURN
73
- displays each test on a separate line with failures being displayed
74
- immediately instead of at the end of the tests.
75
-
76
- If you have the 'ansi' gem installed, then TURN output will be displayed in
77
- wonderful technicolor (but only if your terminal supports ANSI color codes).
78
- Well, the only colors are green and red, but that is still color.
45
+ prerelease: false
46
+ version_requirements: *2153735420
47
+ description: ''
79
48
  email: tim.pease@gmail.com
80
- executables:
49
+ executables:
81
50
  - turn
82
51
  extensions: []
83
-
84
- extra_rdoc_files:
52
+ extra_rdoc_files:
85
53
  - History.txt
86
- - README.txt
54
+ - NOTICE.txt
87
55
  - Release.txt
88
56
  - Version.txt
89
57
  - bin/turn
90
- files:
58
+ - license/GPLv2.txt
59
+ - license/MIT-LICENSE.txt
60
+ - license/RUBY-LICENSE.txt
61
+ files:
62
+ - .travis.yml
63
+ - Gemfile
91
64
  - History.txt
92
- - README.txt
65
+ - NOTICE.txt
66
+ - README.md
93
67
  - Rakefile
94
68
  - Release.txt
95
69
  - Version.txt
@@ -100,8 +74,11 @@ files:
100
74
  - demo/test_sample.rb
101
75
  - demo/test_sample2.rb
102
76
  - lib/turn.rb
77
+ - lib/turn/autoload.rb
103
78
  - lib/turn/autorun/minitest.rb
79
+ - lib/turn/autorun/minitest0.rb
104
80
  - lib/turn/autorun/testunit.rb
81
+ - lib/turn/autorun/testunit0.rb
105
82
  - lib/turn/bin.rb
106
83
  - lib/turn/colorize.rb
107
84
  - lib/turn/command.rb
@@ -124,48 +101,42 @@ files:
124
101
  - lib/turn/runners/solorunner.rb
125
102
  - lib/turn/runners/testrunner.rb
126
103
  - lib/turn/version.rb
104
+ - license/GPLv2.txt
105
+ - license/MIT-LICENSE.txt
106
+ - license/RUBY-LICENSE.txt
127
107
  - test/helper.rb
128
108
  - test/runner
129
109
  - test/test_framework.rb
130
110
  - test/test_reporters.rb
131
111
  - test/test_runners.rb
132
112
  - turn.gemspec
133
- has_rdoc: true
134
113
  homepage: http://gemcutter.org/gems/turn
135
114
  licenses: []
136
-
137
115
  post_install_message:
138
- rdoc_options:
116
+ rdoc_options:
139
117
  - --main
140
- - README.txt
141
- require_paths:
118
+ - README.md
119
+ require_paths:
142
120
  - lib
143
- required_ruby_version: !ruby/object:Gem::Requirement
121
+ required_ruby_version: !ruby/object:Gem::Requirement
144
122
  none: false
145
- requirements:
146
- - - ">="
147
- - !ruby/object:Gem::Version
148
- hash: 3
149
- segments:
150
- - 0
151
- version: "0"
152
- required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
153
128
  none: false
154
- requirements:
155
- - - ">="
156
- - !ruby/object:Gem::Version
157
- hash: 3
158
- segments:
159
- - 0
160
- version: "0"
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
161
133
  requirements: []
162
-
163
134
  rubyforge_project: turn
164
- rubygems_version: 1.3.7
135
+ rubygems_version: 1.8.6
165
136
  signing_key:
166
137
  specification_version: 3
167
138
  summary: Test::Unit Reporter (New) -- new output format for Test::Unit
168
- test_files:
139
+ test_files:
169
140
  - test/test_framework.rb
170
141
  - test/test_reporters.rb
171
142
  - test/test_runners.rb