On 2/7/06, Thomas Healy <[EMAIL PROTECTED]> wrote: > Hugh, > > I am a nubie and I understand what you are saying that less is more... > However, Readability of code is important for me...
You should really learn test/unit-- for readability. It allows you to easily build your own readable assertions like assert_valid_token assert_guest_name_in_cookie assert_guest_ushered_to_room I stole these examples from Marcel Molina's (37signals, Rails) presentation to the Chicago Ruby User Group. You build these custom assertions from the raw materials of what's available in test/unit (and then you can hide them in a module or library and not have them cluttering up the beautiful logic of your tests): def assert_valid_token assert_equal @token, assigns(:token) end def assert_guest_name_in_cookie assert_equal [assigns(:guest).name], cookies['guest_name'] end def assert_guest_ushered_to_room assert_redirected_to room_url(:id => @token.room) end _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
