turn 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/README.txt +4 -1
- data/Rakefile +2 -1
- data/Release.txt +10 -2
- data/VERSION +1 -1
- data/lib/turn.rb +16 -11
- data/tasks/setup.rb +1 -1
- data/tasks/zentest.rake +36 -0
- data/turn.gemspec +3 -3
- metadata +4 -4
- data/.gitignore +0 -3
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -44,6 +44,9 @@ If you have the 'facets' gem installed, then TURN output will be displayed in
|
|
44
44
|
wonderful technicolor (but only if your terminal supports ANSI color codes).
|
45
45
|
Well, the only colors are green and red, but that is still color.
|
46
46
|
|
47
|
+
Note that the 'facets' gem is also required if you wish to use the
|
48
|
+
progressbar output mode.
|
49
|
+
|
47
50
|
=== Command Line
|
48
51
|
|
49
52
|
You can use the *turn* executable in place of the *ruby* interpreter.
|
@@ -84,7 +87,7 @@ scipt. Now your Rails tests will use TURN formatting.
|
|
84
87
|
|
85
88
|
== REQUIREMENTS:
|
86
89
|
|
87
|
-
* facets 2.0+
|
90
|
+
* facets 2.0+ (for colorized output and progressbar output mode)
|
88
91
|
|
89
92
|
== INSTALL:
|
90
93
|
|
data/Rakefile
CHANGED
@@ -17,7 +17,8 @@ PROJ.summary = 'Test::Unit Reporter (New) -- new output format for Test::Unit'
|
|
17
17
|
PROJ.authors = 'Tim Pease'
|
18
18
|
PROJ.email = 'tim.pease@gmail.com'
|
19
19
|
PROJ.url = 'http://codeforpeople.rubyforge.org/turn'
|
20
|
-
PROJ.version = '0.
|
20
|
+
PROJ.version = '0.6.0'
|
21
|
+
PROJ.ignore_file = '.gitignore'
|
21
22
|
|
22
23
|
PROJ.rubyforge.name = 'codeforpeople'
|
23
24
|
|
data/Release.txt
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
-
= Turn 0.
|
1
|
+
= Turn 0.6
|
2
2
|
|
3
|
-
Turn
|
3
|
+
Turn 0.6 is now compatible with Test/Unit 2.0.
|
4
|
+
|
5
|
+
A instance variable name change made between 1.x and 2.0 series
|
6
|
+
of test/unit prevent the Turn modified Testrunner from working
|
7
|
+
correctly.
|
8
|
+
|
9
|
+
Other than that this release is the same as the 0.5.1 release.
|
10
|
+
|
11
|
+
As of 0.5, Turn has some signifficant new features:
|
4
12
|
|
5
13
|
While Turn still provides the exact same functionality for running
|
6
14
|
tests via ruby or testrb as previous versions. The turn commandline
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
turn 0.
|
1
|
+
turn 0.6.0 stable (2009-05-30)
|
data/lib/turn.rb
CHANGED
@@ -7,6 +7,11 @@ module Console
|
|
7
7
|
class TestRunner
|
8
8
|
include Turn::Colorize
|
9
9
|
|
10
|
+
# 1.x of test/unut used @io, where as 2.x uses @output.
|
11
|
+
def turn_out
|
12
|
+
@turn_out ||= (@io || @output)
|
13
|
+
end
|
14
|
+
|
10
15
|
alias :t_attach_to_mediator :attach_to_mediator
|
11
16
|
def attach_to_mediator
|
12
17
|
@mediator.add_listener(TestRunnerMediator::STARTED, &method(:t_started))
|
@@ -14,7 +19,7 @@ module Console
|
|
14
19
|
@mediator.add_listener(TestCase::STARTED, &method(:t_test_started))
|
15
20
|
@mediator.add_listener(TestCase::FINISHED, &method(:t_test_finished))
|
16
21
|
@mediator.add_listener(TestResult::FAULT, &method(:t_fault))
|
17
|
-
|
22
|
+
turn_out.sync = true
|
18
23
|
@t_cur_file, @t_fault = nil
|
19
24
|
end
|
20
25
|
|
@@ -34,23 +39,23 @@ module Console
|
|
34
39
|
else ::ANSICode.red bar end
|
35
40
|
end
|
36
41
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
42
|
+
turn_out.puts bar
|
43
|
+
turn_out.puts " pass: %d, fail: %d, error: %d" % [pass, failure, error]
|
44
|
+
turn_out.puts " total: %d tests with %d assertions in #{elapsed_time} seconds" % [total, @t_result.assertion_count]
|
45
|
+
turn_out.puts bar
|
41
46
|
end
|
42
47
|
|
43
48
|
def t_test_started( name )
|
44
49
|
method, file = name.scan(%r/^([^\(]+)\(([^\)]+)\)/o).flatten!
|
45
50
|
if @t_cur_file != file
|
46
51
|
@t_cur_file = file
|
47
|
-
|
52
|
+
turn_out.puts file
|
48
53
|
end
|
49
|
-
|
54
|
+
turn_out.print " %-69s" % method
|
50
55
|
end
|
51
56
|
|
52
57
|
def t_test_finished( name )
|
53
|
-
|
58
|
+
turn_out.puts " #{PASS}" unless @t_fault
|
54
59
|
@t_fault = false
|
55
60
|
end
|
56
61
|
|
@@ -60,16 +65,16 @@ module Console
|
|
60
65
|
|
61
66
|
case fault
|
62
67
|
when ::Test::Unit::Error
|
63
|
-
|
68
|
+
turn_out.puts ERROR
|
64
69
|
msg << fault.to_s.split("\n")[2..-1].join("\n\t")
|
65
70
|
when ::Test::Unit::Failure
|
66
|
-
|
71
|
+
turn_out.puts " #{FAIL}"
|
67
72
|
msg << fault.location[0].to_s << "\n\t"
|
68
73
|
msg << fault.message.gsub("\n","\n\t")
|
69
74
|
end
|
70
75
|
|
71
76
|
msg = ::ANSICode.magenta msg if COLORIZE
|
72
|
-
|
77
|
+
turn_out.puts msg
|
73
78
|
end
|
74
79
|
|
75
80
|
end
|
data/tasks/setup.rb
CHANGED
@@ -147,7 +147,7 @@ RCOV = "#{RUBY} -S rcov"
|
|
147
147
|
RDOC = "#{RUBY} -S rdoc"
|
148
148
|
GEM = "#{RUBY} -S gem"
|
149
149
|
|
150
|
-
%w(rcov spec/rake/spectask rubyforge bones facets/ansicode).each do |lib|
|
150
|
+
%w(rcov spec/rake/spectask rubyforge bones facets/ansicode zentest).each do |lib|
|
151
151
|
begin
|
152
152
|
require lib
|
153
153
|
Object.instance_eval {const_set "HAVE_#{lib.tr('/','_').upcase}", true}
|
data/tasks/zentest.rake
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
if HAVE_ZENTEST
|
2
|
+
|
3
|
+
# --------------------------------------------------------------------------
|
4
|
+
if test(?e, PROJ.test.file) or not PROJ.test.files.to_a.empty?
|
5
|
+
require 'autotest'
|
6
|
+
|
7
|
+
namespace :test do
|
8
|
+
task :autotest do
|
9
|
+
Autotest.run
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Run the autotest loop"
|
14
|
+
task :autotest => 'test:autotest'
|
15
|
+
|
16
|
+
end # if test
|
17
|
+
|
18
|
+
# --------------------------------------------------------------------------
|
19
|
+
if HAVE_SPEC_RAKE_SPECTASK and not PROJ.spec.files.to_a.empty?
|
20
|
+
require 'autotest/rspec'
|
21
|
+
|
22
|
+
namespace :spec do
|
23
|
+
task :autotest do
|
24
|
+
load '.autotest' if test(?f, '.autotest')
|
25
|
+
Autotest::Rspec.run
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
desc "Run the autotest loop"
|
30
|
+
task :autotest => 'spec:autotest'
|
31
|
+
|
32
|
+
end # if rspec
|
33
|
+
|
34
|
+
end # if HAVE_ZENTEST
|
35
|
+
|
36
|
+
# EOF
|
data/turn.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{turn}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.6.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Tim Pease"]
|
9
|
-
s.date = %q{2009-03-
|
9
|
+
s.date = %q{2009-03-26}
|
10
10
|
s.default_executable = %q{turn}
|
11
11
|
s.description = %q{TURN is a new way to view Test::Unit results. With longer running tests, it can be very frustrating to see a failure (....F...) and then have to wait till all the tests finish before you can see what the exact failure was. TURN displays each test on a separate line with failures being displayed immediately instead of at the end of the tests. If you have the 'facets' gem installed, then TURN output will be displayed in wonderful technicolor (but only if your terminal supports ANSI color codes). Well, the only colors are green and red, but that is still color.}
|
12
12
|
s.email = %q{tim.pease@gmail.com}
|
13
13
|
s.executables = ["turn"]
|
14
14
|
s.extra_rdoc_files = ["History.txt", "README.txt", "Release.txt", "bin/turn"]
|
15
|
-
s.files = ["
|
15
|
+
s.files = ["History.txt", "README.txt", "Rakefile", "Release.txt", "VERSION", "bin/turn", "lib/turn.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/reporter.rb", "lib/turn/reporters/dot_reporter.rb", "lib/turn/reporters/marshal_reporter.rb", "lib/turn/reporters/outline_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/solorunner.rb", "lib/turn/runners/testrunner.rb", "test/test_example.rb", "test/test_sample.rb", "turn.gemspec", "work/quicktest.rb", "work/turn.rb"]
|
16
16
|
s.has_rdoc = true
|
17
17
|
s.homepage = %q{http://codeforpeople.rubyforge.org/turn}
|
18
18
|
s.rdoc_options = ["--main", "README.txt"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Pease
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-02 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 2.
|
23
|
+
version: 2.5.0
|
24
24
|
version:
|
25
25
|
description: TURN is a new way to view Test::Unit results. With longer running tests, it can be very frustrating to see a failure (....F...) and then have to wait till all the tests finish before you can see what the exact failure was. TURN displays each test on a separate line with failures being displayed immediately instead of at the end of the tests. If you have the 'facets' gem installed, then TURN output will be displayed in wonderful technicolor (but only if your terminal supports ANSI color codes). Well, the only colors are green and red, but that is still color.
|
26
26
|
email: tim.pease@gmail.com
|
@@ -34,7 +34,6 @@ extra_rdoc_files:
|
|
34
34
|
- Release.txt
|
35
35
|
- bin/turn
|
36
36
|
files:
|
37
|
-
- .gitignore
|
38
37
|
- History.txt
|
39
38
|
- README.txt
|
40
39
|
- Rakefile
|
@@ -70,6 +69,7 @@ files:
|
|
70
69
|
- tasks/spec.rake
|
71
70
|
- tasks/svn.rake
|
72
71
|
- tasks/test.rake
|
72
|
+
- tasks/zentest.rake
|
73
73
|
- test/test_example.rb
|
74
74
|
- test/test_sample.rb
|
75
75
|
- turn.gemspec
|
data/.gitignore
DELETED