public
Rubygem
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
tweak to rake task

git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@387 
7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
tsaleh (author)
Fri Mar 14 07:21:31 -0700 2008
commit  53b1bb818a7a251e598241a0441d98fd45469910
tree    d37d0b0a62b1ec521ff58f9e38e241bcdd3d5f22
parent  2d92da234fcc78797b6ca7642ae14466305e7f8a
...
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
38
39
40
...
15
16
17
 
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
20
21
22
0
@@ -15,26 +15,8 @@ namespace :shoulda do
0
       klass = File.basename(file, '.rb').classify.constantize
0
       
0
       puts
0
- puts "#{klass.name.gsub(/Test$/, '')}"
0
       test_methods = klass.instance_methods.grep(/^test/).map {|s| s.gsub(/^test: /, '')}.sort
0
- test_methods.each {|m| puts " - #{m}" }
0
- # puts "#{klass.name.gsub(/Test$/, '')}"
0
- # test_methods = klass.instance_methods.grep(/^test/).sort
0
- #
0
- # method_hash = test_methods.inject({}) do |h, name|
0
- # header = name.gsub(/^test: (.*)should.*$/, '\1')
0
- # test = name.gsub(/^test:.*should (.*)$/, '\1')
0
- # h[header] ||= []
0
- # h[header] << test
0
- # h
0
- # end
0
- #
0
- # method_hash.keys.sort.each do |header|
0
- # puts " #{header.chomp} should"
0
- # method_hash[header].each do |test|
0
- # puts " - #{test}"
0
- # end
0
- # end
0
+ test_methods.each {|m| puts m }
0
     end
0
   end
0
 end

Comments

    No one has commented yet.