shindo 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shindo.rb +1 -1
- data/lib/shindo/bin.rb +1 -1
- data/lib/shindo/taciturn.rb +12 -13
- data/shindo.gemspec +1 -1
- metadata +2 -2
data/lib/shindo.rb
CHANGED
data/lib/shindo/bin.rb
CHANGED
@@ -45,11 +45,11 @@ def run_in_thread(helpers, tests, thread_locals)
|
|
45
45
|
end
|
46
46
|
for file in helpers
|
47
47
|
unless Thread.main[:exit]
|
48
|
-
Thread.current[:file] = file
|
49
48
|
load(file)
|
50
49
|
end
|
51
50
|
end
|
52
51
|
for file in tests
|
52
|
+
Thread.current[:file] = file
|
53
53
|
unless Thread.main[:exit]
|
54
54
|
load(file)
|
55
55
|
end
|
data/lib/shindo/taciturn.rb
CHANGED
@@ -3,30 +3,30 @@ module Shindo
|
|
3
3
|
|
4
4
|
private
|
5
5
|
|
6
|
-
def display_description_stack
|
7
|
-
return if description_stack.empty?
|
8
|
-
formatador.indent do
|
9
|
-
formatador.display_line(description_stack.pop)
|
10
|
-
display_description_stack
|
6
|
+
def display_description_stack
|
7
|
+
return if @description_stack.empty?
|
8
|
+
Thread.current[:formatador].indent do
|
9
|
+
Thread.current[:formatador].display_line(@description_stack.pop)
|
10
|
+
display_description_stack
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def display_description(description)
|
15
15
|
unless @described
|
16
|
-
Thread.current[:formatador].display(
|
16
|
+
Thread.current[:formatador].display(Thread.current[:file])
|
17
17
|
print ' '
|
18
18
|
@described = true
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
def display_error(error)
|
23
|
-
Thread.current[:formatador].display_line
|
24
|
-
Thread.current[:formatador].display_line(Thread.current[:file])
|
25
23
|
display_description_stack
|
26
|
-
Thread.current[:formatador].
|
27
|
-
|
28
|
-
|
29
|
-
Thread.current[:formatador].
|
24
|
+
Thread.current[:formatador].indent do
|
25
|
+
Thread.current[:formatador].display_line("[red]#{error.message} (#{error.class})[/]")
|
26
|
+
unless error.backtrace.empty?
|
27
|
+
Thread.current[:formatador].indent do
|
28
|
+
Thread.current[:formatador].display_lines(error.backtrace.map {|line| "[red]#{line}[/]"})
|
29
|
+
end
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
@@ -34,7 +34,6 @@ module Shindo
|
|
34
34
|
def display_failure(description)
|
35
35
|
Thread.current[:totals][:failed] += 1
|
36
36
|
Thread.current[:formatador].display_line
|
37
|
-
Thread.current[:formatador].display_line(Thread.current[:file])
|
38
37
|
display_description_stack
|
39
38
|
Thread.current[:formatador].display_line("[red]- #{description}[/]")
|
40
39
|
end
|
data/shindo.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'shindo'
|
16
|
-
s.version = '0.1.
|
16
|
+
s.version = '0.1.9'
|
17
17
|
s.date = '2010-11-16'
|
18
18
|
s.rubyforge_project = 'shindo'
|
19
19
|
|