shoulda-addons 0.2.1 → 0.2.2

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/README.md CHANGED
@@ -14,4 +14,9 @@ Install from gemcutter via: `gem install shoulda-addons`
14
14
 
15
15
  Is it safe for Ruby 1.9? Yes! Support for the new MiniTest framework is built-in.
16
16
 
17
- Author: Mathias Meyer <meyer@paperplanes.de>
17
+ Author: Mathias Meyer <meyer@paperplanes.de>
18
+
19
+ #### Contributions
20
+
21
+ * Test::Unit 2.0 compatibility (github.com/ffmike)
22
+ * Include the test class name in the benchmark output for Test::Unit (github.com/tobias)
@@ -56,7 +56,7 @@ module Test
56
56
  runtime = Benchmark.realtime do
57
57
  send(" #{name}")
58
58
  end
59
- Shoulda.runtimes[name] = runtime
59
+ Shoulda.runtimes[self.name] = runtime
60
60
  end
61
61
  @ignoring_added_methods = false
62
62
  end
@@ -68,4 +68,4 @@ module Shoulda
68
68
  def self.runtimes
69
69
  @runtimes ||= {}
70
70
  end
71
- end
71
+ end
@@ -34,10 +34,18 @@ else
34
34
  module Console
35
35
  class TestRunner
36
36
  def test_finished(name)
37
- if is_fault?(name)
38
- puts Color.red(name.gsub(/test: /, ""))
37
+ if defined?(Test::Unit::Color)
38
+ if is_fault?(name)
39
+ output(name.gsub(/test: /, ""), Test::Unit::Color.new("red"))
40
+ else
41
+ output(name.gsub(/test: /, ""), Test::Unit::Color.new("green"))
42
+ end
39
43
  else
40
- puts Color.green(name.to_s.gsub(/test: /, ""))
44
+ if is_fault?(name)
45
+ output(Color.red(name.gsub(/test: /, "")))
46
+ else
47
+ output(Color.green(name.to_s.gsub(/test: /, "")))
48
+ end
41
49
  end
42
50
  end
43
51
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-addons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Meyer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-19 00:00:00 +02:00
12
+ date: 2009-11-06 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15