turn 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/Version.txt +1 -1
- data/demo/test_sample2.rb +33 -0
- data/lib/turn/components/method.rb +2 -2
- data/lib/turn/reporters/dot_reporter.rb +2 -2
- data/lib/turn/reporters/outline_reporter.rb +4 -3
- data/lib/turn/runners/isorunner.rb +14 -3
- metadata +5 -4
data/History.txt
CHANGED
data/Version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.1
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class Sample2Case1 < Test::Unit::TestCase
|
2
|
+
def test_sample_pass1
|
3
|
+
assert_equal(1,1)
|
4
|
+
end
|
5
|
+
def test_sample_pass2
|
6
|
+
assert_equal(2,2)
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_sample_fail1
|
10
|
+
assert_equal(1,2)
|
11
|
+
end
|
12
|
+
def test_sample_fail2
|
13
|
+
assert_include(1,[])
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_sample_error1
|
17
|
+
raise StandardError, "Raised exception!"
|
18
|
+
end
|
19
|
+
def test_sample_error2
|
20
|
+
raise StandardError, "Raised another exception!"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
class Sample2Case2 < Test::Unit::TestCase
|
26
|
+
def test_sample_pass1
|
27
|
+
assert_equal(1,1)
|
28
|
+
end
|
29
|
+
def test_sample_pass2
|
30
|
+
assert_equal(1,1)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
@@ -19,14 +19,14 @@ module Turn
|
|
19
19
|
|
20
20
|
def fail!(assertion)
|
21
21
|
@fail, @error = true, false
|
22
|
-
@
|
22
|
+
@raised = assertion
|
23
23
|
@message = assertion.message
|
24
24
|
@backtrace = assertion.backtrace
|
25
25
|
end
|
26
26
|
|
27
27
|
def error!(exception)
|
28
28
|
@fail, @error = false, true
|
29
|
-
@
|
29
|
+
@raised = exception
|
30
30
|
@message = exception.message
|
31
31
|
@backtrace = exception.backtrace
|
32
32
|
end
|
@@ -53,9 +53,9 @@ module Turn
|
|
53
53
|
unless list.empty? # or verbose?
|
54
54
|
#report << "\n\n-- Failures and Errors --\n\n"
|
55
55
|
list.uniq.each do |testunit|
|
56
|
-
message = testunit.fail? ? ' '+FAIL : ERROR
|
56
|
+
message = testunit.fail? ? ' ' + FAIL : ERROR
|
57
57
|
message = message + ' ' + testunit.message.tabto(0)
|
58
|
-
message << "\n" + filter_backtrace(testunit.backtrace).first
|
58
|
+
message << "\n" + (filter_backtrace(testunit.backtrace).first || '')
|
59
59
|
report << "\n" << message << "\n"
|
60
60
|
end
|
61
61
|
report << "\n"
|
@@ -76,6 +76,7 @@ module Turn
|
|
76
76
|
cmd = cmd.join(' ')
|
77
77
|
|
78
78
|
#out = `#{cmd}`
|
79
|
+
#err = ''
|
79
80
|
|
80
81
|
out, err = nil, nil
|
81
82
|
Open3.popen3(cmd) do |stdin, stdout, stderr|
|
@@ -84,9 +85,17 @@ module Turn
|
|
84
85
|
err = stderr.read.chomp
|
85
86
|
end
|
86
87
|
|
88
|
+
# TODO: how to report? will need to add something to reporter
|
89
|
+
# b/c it may have redirected stdout. Or use STDOUT?
|
90
|
+
#if !err.empty?
|
91
|
+
# puts err
|
92
|
+
# raise
|
93
|
+
#end
|
94
|
+
|
87
95
|
files = kase.files
|
88
96
|
|
89
|
-
|
97
|
+
# remove any unexpected output injected at the beginning
|
98
|
+
yaml = out[out.index(/^---/)..-1]
|
90
99
|
sub_suite = YAML.load(yaml)
|
91
100
|
|
92
101
|
# TODO: How to handle pairs?
|
@@ -100,9 +109,11 @@ module Turn
|
|
100
109
|
kase.tests.each do |test|
|
101
110
|
reporter.start_test(test)
|
102
111
|
if test.error?
|
103
|
-
reporter.error(test.message)
|
112
|
+
#reporter.error(test.message)
|
113
|
+
reporter.error(test.raised)
|
104
114
|
elsif test.fail?
|
105
|
-
reporter.fail(test.message)
|
115
|
+
#reporter.fail(test.message)
|
116
|
+
reporter.error(test.raised)
|
106
117
|
else
|
107
118
|
reporter.pass
|
108
119
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 1
|
10
|
+
version: 0.8.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tim Pease
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-10 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- demo/test_autorun_minitest.rb
|
98
98
|
- demo/test_autorun_testunit.rb
|
99
99
|
- demo/test_sample.rb
|
100
|
+
- demo/test_sample2.rb
|
100
101
|
- lib/turn.rb
|
101
102
|
- lib/turn/autorun/minitest.rb
|
102
103
|
- lib/turn/autorun/testunit.rb
|