Show
Ignore:
Timestamp:
08/03/04 11:07:16 (4 years ago)
Author:
deveiant
Message:

- Fixed a bug when defining actions via a Symbol. Thanks to Aidan Rogers

<aidan@…> for the bug report.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Arrow/trunk/tests/applet.tests.rb

    r40 r144  
    8888     
    8989     
     90    def test_31_action_function_symbol_arg 
     91        printTestHeader "Applet: Define actions via action() function (Symbol arg)" 
     92        rval = meow = nil 
     93 
     94        # Definition only 
     95        assert_nothing_raised { 
     96            @appletClass.instance_eval { 
     97                action( :woof ) { "woof" } 
     98            } 
     99        } 
     100 
     101        assert_has_instance_method @appletClass, :woof_action 
     102 
     103        # With Proxy 
     104        assert_nothing_raised { 
     105            @appletClass.instance_eval { 
     106                meow = action(:meow) {"meow"} 
     107                meow.template = 'one.tmpl' 
     108            } 
     109        } 
     110 
     111        assert_instance_of Arrow::Applet::SigProxy, meow 
     112        assert_has_instance_method @appletClass, :meow_action 
     113        assert_not_nil @appletClass.signature[:templates][:meow], "signature entries missing" 
     114        assert_equal 'one.tmpl', @appletClass.signature[:templates][:meow] 
     115    end 
     116     
     117     
    90118end 
    91119