From: Shashank Date Date: 2003-01-14T12:53:20+09:00 Subject: Re: Yet Another Test First Example ... in Ruby This is a multi-part message in MIME format. ------=_NextPart_000_0059_01C2BB4E.125886F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Very nice ... One question: In the "Our First Test" section, you say: Ruby Comments: The require keyword in Ruby looks in the ruby libraries = for a file named 'test/unit.rb' and will load it in to the running = program. Is "require" a keyword (i.e. reserved) in Ruby ? I always understood it = as a function which took filename as argument. Please correct me if I am wrong. Thanks, -- shanko =20 "Jim Weirich" wrote in message = news:1042510570.8219.177.camel@traken... > Our local XP group did a Test-Driven Design clinic. Although most of > the group chose to use either Java or .NET, I convinced one haples = soul > to pair with me doing Ruby. =20 >=20 > I wrote a reconstruction of the evening at ... >=20 > http://w3.one.net/~jweirich/talks/tdddemo/ >=20 > I put this together for two reasons. > (1) To reinforce the TDD technique for the those at the meeting who = new > to XP. > (2) Provide an excuse to show some Ruby code to the group, in the = hopes > recruiting Ruby pair programmers for our next meeing. >=20 > If you've seen Test-Driven Development before, this will be nothing = new, > and there are certainly better Ruby tutorials out there. But I = thought > I would post it here on the off chance someone finds it useful. >=20 > --=20 > -- Jim Weirich jweirich@one.net http://w3.one.net/~jweirich > --------------------------------------------------------------------- > "Beware of bugs in the above code; I have only proved it correct,=20 > not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) >=20 ------=_NextPart_000_0059_01C2BB4E.125886F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Very nice ...
 
One question:
 
In the "Our=20 First Test" section, you=20 say:

Ruby Comments: The = require=20 keyword in Ruby looks in the ruby libraries for a file named = 'test/unit.rb' and=20 will load it in to the running program.

Is "require" a keyword (i.e. reserved) in = Ruby ? I=20 always understood it as a function which took filename as = argument.

Please correct me if I am = wrong.

Thanks,

-- shanko

 

 

"Jim Weirich" <jweirich@one.net> = wrote in message=20 news:1042510570.8219.177.camel@traken...
> Our local XP = group did a=20 Test-Driven Design clinic.  Although most of
> the group = chose to use=20 either Java or .NET, I convinced one haples soul
> to pair with me = doing=20 Ruby. 
>
> I wrote a reconstruction of the evening at = ....
>
>   
http://w3.one.net/~jweirich/talks/tdddemo/
>
> I put this together for two reasons.
> (1) = To=20 reinforce the TDD technique for the those at the meeting who new
> = to=20 XP.
> (2) Provide an excuse to show some Ruby code to the group, = in the=20 hopes
> recruiting Ruby pair programmers for our next = meeing.
>=20
> If you've seen Test-Driven Development before, this will be = nothing=20 new,
> and there are certainly better Ruby tutorials out = there.  But=20 I thought
> I would post it here on the off chance someone finds = it=20 useful.
>
> --
> -- Jim = Weirich    =20
jweirich@one.net   =20 http://w3.one.net/~jweirich
>=20 ---------------------------------------------------------------------
= >=20 "Beware of bugs in the above code; I have only proved it correct, =
> not=20 tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
>=20
------=_NextPart_000_0059_01C2BB4E.125886F0--