shindo 0.1.8 → 0.1.9

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/lib/shindo.rb CHANGED
@@ -5,7 +5,7 @@ require 'gestalt'
5
5
  module Shindo
6
6
 
7
7
  unless const_defined?(:VERSION)
8
- VERSION = '0.1.8'
8
+ VERSION = '0.1.9'
9
9
  end
10
10
 
11
11
  def self.tests(description = nil, tags = [], &block)
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
@@ -3,30 +3,30 @@ module Shindo
3
3
 
4
4
  private
5
5
 
6
- def display_description_stack(description_stack = @description_stack, formatador = Formatador.new)
7
- return if description_stack.empty?
8
- formatador.indent do
9
- formatador.display_line(description_stack.pop)
10
- display_description_stack(description_stack, formatador)
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(description)
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].display_line("[red]#{error.message} (#{error.class})[/]")
27
- unless error.backtrace.empty?
28
- Thread.current[:formatador].indent do
29
- Thread.current[:formatador].display_lines(error.backtrace.map {|line| "[red]#{line}[/]"})
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.8'
16
+ s.version = '0.1.9'
17
17
  s.date = '2010-11-16'
18
18
  s.rubyforge_project = 'shindo'
19
19
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 8
9
- version: 0.1.8
8
+ - 9
9
+ version: 0.1.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)