From: "Volkmann, Mark" Date: 2002-10-05T03:07:53+09:00 Subject: Re: assertions in Ruby This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C26BD0.CDC785D0 Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Alan Chen [mailto:alan@digikata.com] > Sent: Friday, October 04, 2002 11:37 AM > To: ruby-talk@ruby-lang.org > Subject: Re: assertions in Ruby > > On Fri, Oct 04, 2002 at 10:43:46PM +0900, Volkmann, Mark wrote: > > > > Is anyone aware of a Ruby module that adds support for > assertions such as what > > is supported in Java 1.4? I wrote such a thing yesterday > and am considering > > releasing it if I'm not duplicating what someone else has > already done. > > I've included some examples below showing how mine is used. > > I have an unreleased, partailly completed module which include the > Test::Unit asserts when $DEBUG is set and do nothing otherwise. It > looks almost the same as yours. The only suggestion I have is maybe > working it in with the Ruby::Unit or Test::Unit frameworks. I'm not quite convinced that assertions should be integrated with a unit testing framework. They seem fundamentally different to me. With assertions enabled, an application generally stops as soon as one fails. Results are not collected into a report since only one failure is reported. Assertions go in the code and remain there for documentation purposes. With unit tests, tests continue even if one fails. Results are collected into a report. Unit tests go in a separate class written exclusively for testing purposes. What kinds of things do you envision that an assertion framework borrow from a unit testing framework? *********************************************************************************** WARNING: All e-mail sent to and from this address will be received or otherwise recorded by the A.G. Edwards corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ************************************************************************************ ------_=_NextPart_001_01C26BD0.CDC785D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: assertions in Ruby

> -----Original Message-----
> From: Alan Chen [mailto:alan@digikata.com]
> Sent: Friday, October 04, 2002 11:37 AM
> To: ruby-talk@ruby-lang.org
> Subject: Re: assertions in Ruby
>
> On Fri, Oct 04, 2002 at 10:43:46PM +0900, Volkmann,= Mark wrote:
> >
> > Is anyone aware of a Ruby module that adds sup= port for
> assertions such as what
> > is supported in Java 1.4?  I wrote such a= thing yesterday
> and am considering
> > releasing it if I'm not duplicating what someo= ne else has
> already done.
> > I've included some examples below showing how = mine is used.
>
> I have an unreleased, partailly completed module wh= ich include the
> Test::Unit asserts when $DEBUG is set and do nothin= g otherwise. It
> looks almost the same as yours.  The only sugg= estion I have is maybe
> working it in with the Ruby::Unit or Test::Unit fra= meworks.

I'm not quite convinced that assertions should be integra= ted with a unit testing framework. They seem fundamentally different to me.=

With assertions enabled, an application generally stops a= s soon as one fails.  Results are not collected into a report since on= ly one failure is reported.  Assertions go in the code and remain ther= e for documentation purposes.

With unit tests, tests continue even if one fails.  = Results are collected into a report.  Unit tests go in a separate clas= s written exclusively for testing purposes.

What kinds of things do you envision that an assertion fr= amework borrow from a unit testing framework?



***************************************************************************= ********
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
***************************************************************************= *********
------_=_NextPart_001_01C26BD0.CDC785D0--