Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9190

Show
Ignore:
Timestamp:
04/01/08 06:11:56 (4 months ago)
Author:
bitsweat
Message:

Ruby 1.9 compat: proc arity

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/test/controller/dispatcher_test.rb

    r9187 r9190  
    6464  def test_prepare_application_runs_callbacks_if_unprepared 
    6565    a = b = c = nil 
    66     Dispatcher.to_prepare { a = b = c = 1 } 
    67     Dispatcher.to_prepare { b = c = 2 } 
    68     Dispatcher.to_prepare { c = 3 } 
     66    Dispatcher.to_prepare { |*args| a = b = c = 1 } 
     67    Dispatcher.to_prepare { |*args| b = c = 2 } 
     68    Dispatcher.to_prepare { |*args| c = 3 } 
    6969 
    7070    # Skip the callbacks when already prepared. 
     
    100100    Dependencies.stubs(:load?).returns(false) 
    101101    called = 0 
    102     Dispatcher.to_prepare(:unprepared_test) { called += 1 } 
     102    Dispatcher.to_prepare(:unprepared_test) { |*args| called += 1 } 
    103103    2.times { dispatch } 
    104104    assert_equal 1, called