public
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/thoughtbot/shoulda.git
Search Repo:
doc changes and renamed a file

git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@82 
7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
tsaleh (author)
Fri Apr 06 07:28:27 -0700 2007
commit  7910643c6f48fa7d502a2a2fb50bc331f565d4a4
tree    a7fe5ad098f0f79e9883678fc2b8ec88896a6c16
parent  aabc89c561ad1d46b92bfa40b3c7d0a61f98481a
...
12
13
14
15
 
16
17
18
...
12
13
14
 
15
16
17
18
0
@@ -12,7 +12,7 @@ end
0
 
0
 Rake::RDocTask.new { |rdoc|
0
   rdoc.rdoc_dir = 'doc'
0
- rdoc.title = "ThoughtBot Test Helpers -- Making your tests easy on the fingers and eyes"
0
+ rdoc.title = "Shoulda -- Making your tests easy on the fingers and eyes"
0
   rdoc.options << '--line-numbers' << '--inline-source'
0
   rdoc.template = "#{ENV['template']}.rb" if ENV['template']
0
   rdoc.rdoc_files.include('README', 'lib/**/*.rb')
...
9
10
11
12
 
13
14
15
...
25
26
27
28
 
29
30
31
...
43
44
45
46
47
 
 
48
49
50
51
52
53
54
55
 
 
56
57
58
...
62
63
64
65
66
67
 
 
 
68
69
70
...
9
10
11
 
12
13
14
15
...
25
26
27
 
28
29
30
31
...
43
44
45
 
 
46
47
48
49
50
51
52
53
 
 
54
55
56
57
58
...
62
63
64
 
 
 
65
66
67
68
69
70
0
@@ -9,7 +9,7 @@ require 'test/unit/ui/console/testrunner'
0
 # every rake task, as though there was another (empty) set of tests.
0
 # A fix would be most welcome.
0
 #
0
-module Color
0
+module ThoughtBot::Shoulda::Color
0
   COLORS = { :clear => 0, :red => 31, :green => 32, :yellow => 33 } # :nodoc:
0
   def self.method_missing(color_name, *args) # :nodoc:
0
     color(color_name) + args.first + color(:clear)
0
@@ -25,7 +25,7 @@ module Test # :nodoc:
0
       alias :old_to_s :to_s
0
       def to_s
0
         if old_to_s =~ /\d+ tests, \d+ assertions, (\d+) failures, (\d+) errors/
0
- Color.send($1.to_i != 0 || $2.to_i != 0 ? :red : :green, $&)
0
+ ThoughtBot::Shoulda::Color.send($1.to_i != 0 || $2.to_i != 0 ? :red : :green, $&)
0
         end
0
       end
0
     end
0
@@ -43,16 +43,16 @@ module Test # :nodoc:
0
     class Failure # :nodoc:
0
       alias :old_long_display :long_display
0
       def long_display
0
- # old_long_display.sub('Failure', Color.red('Failure'))
0
- Color.red(old_long_display)
0
+ # old_long_display.sub('Failure', ThoughtBot::Shoulda::Color.red('Failure'))
0
+ ThoughtBot::Shoulda::Color.red(old_long_display)
0
       end
0
     end
0
 
0
     class Error # :nodoc:
0
       alias :old_long_display :long_display
0
       def long_display
0
- # old_long_display.sub('Error', Color.yellow('Error'))
0
- Color.yellow(old_long_display)
0
+ # old_long_display.sub('Error', ThoughtBot::Shoulda::Color.yellow('Error'))
0
+ ThoughtBot::Shoulda::Color.yellow(old_long_display)
0
       end
0
     end
0
 
0
@@ -62,9 +62,9 @@ module Test # :nodoc:
0
           def output_single(something, level=NORMAL)
0
             return unless (output?(level))
0
             something = case something
0
- when '.' then Color.green('.')
0
- when 'F' then Color.red("F")
0
- when 'E' then Color.yellow("E")
0
+ when '.' then ThoughtBot::Shoulda::Color.green('.')
0
+ when 'F' then ThoughtBot::Shoulda::Color.red("F")
0
+ when 'E' then ThoughtBot::Shoulda::Color.yellow("E")
0
             else something
0
             end
0
             @io.write(something)

Comments

    No one has commented yet.