Austin Ziegler
5/6/2005 4:25:00 PM
On 5/6/05, Ryan Leavengood <mrcode@netrox.net> wrote:
> Nathaniel Talbott wrote:
> >
> > I'd favor the last option, since Ruby's dynamic
> > nature makes a method count extremely brittle. Perhaps you could
> > explicitly check for methods you expect to be there, or better yet,
> > whether the object you're testing #responds_to? the methods of interest?
>
> I agree with this.
>
> Brian: why is it important that you test the number of methods?
Thirded. However, if it is important to check the method count, call
#methods with a parameter of +false+. That will only show those
methods that are defined in your class directly.
-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca