Changeset 6812 for platform/tdiary/spec

Show
Ignore:
Timestamp:
02/17/08 16:05:29 (10 months ago)
Author:
hsbt
Message:

platform/tdiary/spec/spec_helper.rb: add footer_proc.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/tdiary/spec/spec_helper.rb

    r6811 r6812  
    1717                @date = nil 
    1818                @header_procs = [] 
     19                @footer_procs = [] 
    1920                @update_procs = [] 
    2021                @body_enter_procs = [] 
     
    2829        def add_header_proc( block = Proc::new ) 
    2930                @header_procs << block 
     31        end 
     32 
     33        def add_footer_proc( block = Proc::new ) 
     34                @footer_procs << block 
    3035        end 
    3136 
     
    4247        end 
    4348         
     49        def footer_proc 
     50                r = [] 
     51                @footer_procs.each do |proc| 
     52                        r << proc.call 
     53                end 
     54                r.join.chomp 
     55        end 
     56 
    4457        def add_body_enter_proc( block = Proc::new ) 
    4558                @body_enter_procs << block