From: Josh Cheek Date: 2010-03-30T16:57:44+09:00 Subject: Re: return number of spaces at the beginning of a line --000e0cd0ed46d262220482fffb21 Content-Type: text/plain; charset=ISO-8859-1 Two things: 1) The name of the method multi_line_spaces won't actually test, because TestUnit only considers a method to be a test if it begins with 'test' so you should change it's name to test_multi_line_spaces 2) I thought of another test you should add. Throwing wholly bad data at it. In this case, nil def test_nil assert_raises NoMethodError do leading_spaces nil end end 'The Pragmatic Programmer' says that it is better to crash early, so I tested that it should throw an error. You might also consider what you would like it to do in the event that you pass it something not a string. Perhaps invoke the to_s method and then get the length of the leading whitespace. Perhaps raise a different error. --000e0cd0ed46d262220482fffb21--