[#309764] The Rubyist -- a semi-monthly magazine for Rubyists AVAILABLE NOW — "Jeremy McAnally" <jeremymcanally@...>

Hello all,

9 messages 2008/08/01

[#309802] Using array.select with grep — Milo Thurston <knirirr@...>

Using irb I set up the following arrays:

16 messages 2008/08/01

[#309821] About circular dependencies in RubyGems (the library). And about the order in $". — "Erik Veenstra" <erikveen@...>

Hi,

13 messages 2008/08/01

[#309824] Determining MAC address — "Glen Holcomb" <damnbigman@...>

What would be the best (clean, cross-platform) way of determining the MAC

12 messages 2008/08/01

[#309867] Capturing shell command output and success? — "Kyle Schmitt" <kyleaschmitt@...>

I know shell commands have beaten to death on this list, but searching

10 messages 2008/08/01

[#309878] Help finding this syntax error — Patrick Li <patrickli_2001@...>

<code>

14 messages 2008/08/01

[#309903] unit testing advice — Shadowfirebird <shadowfirebird@...>

Forgive me if this is a stupid question.

58 messages 2008/08/01
[#309905] Re: unit testing advice — "Gregory Brown" <gregory.t.brown@...> 2008/08/01

On Fri, Aug 1, 2008 at 5:31 PM, Shadowfirebird <shadowfirebird@gmail.com> wrote:

[#309907] Re: unit testing advice — Shadowfirebird <shadowfirebird@...> 2008/08/01

Many thanks. Clearly I'm going to have to go back to research mode on

[#309916] Re: unit testing advice — Phlip <phlip2005@...> 2008/08/02

Shadowfirebird wrote:

[#309947] Re: unit testing advice — "David A. Black" <dblack@...> 2008/08/02

Hi --

[#309948] Re: unit testing advice — Phlip <phlip2005@...> 2008/08/02

David A. Black wrote:

[#309949] Re: unit testing advice — "David A. Black" <dblack@...> 2008/08/02

Hi --

[#309960] Re: unit testing advice — Shadowfirebird <shadowfirebird@...> 2008/08/02

I certainly "get" the idea that it's better to write the tests first.

[#309966] Re: unit testing advice — "David A. Black" <dblack@...> 2008/08/02

Hi --

[#309979] Re: unit testing advice — James Britt <james.britt@...> 2008/08/02

David A. Black wrote:

[#309983] Re: unit testing advice — "David A. Black" <dblack@...> 2008/08/02

Hi --

[#310011] Re: unit testing advice — James Britt <james.britt@...> 2008/08/03

David A. Black wrote:

[#310018] Re: unit testing advice — "David A. Black" <dblack@...> 2008/08/03

Hi --

[#310050] RubyConf 2008 call for talk proposals — Richard Kilmer <rich@...>

Ruby Central is pleased to announce that we are accepting

11 messages 2008/08/04

[#310127] hash code reference - this only returns 'nil' please help me — Mmcolli00 Mom <mmc_collins@...>

Please tell me what I am doing wrong. i thought h[ErrFieldID] would work

12 messages 2008/08/04
[#310128] Re: hash code reference - this only returns 'nil' please help me — Sebastian Hungerecker <sepp2k@...> 2008/08/04

Mmcolli00 Mom wrote:

[#310131] Re: hash code reference - this only returns 'nil' please help me — Mmcolli00 Mom <mmc_collins@...> 2008/08/04

Sebastian Hungerecker wrote:

[#310154] Matrix class: How to set a single element ? — Marcio Braga <mbraga0001@...>

simple code:

11 messages 2008/08/05

[#310159] State of the Onion — "M. Edward (Ed) Borasky" <znmeb@...>

http://www.gcn.com/online/vol1_no1/46724-1.html

36 messages 2008/08/05
[#310179] Re: State of the Onion — "Michael T. Richter" <ttmrichter@...> 2008/08/05

On Tue, 2008-08-05 at 11:05 +0900, M. Edward (Ed) Borasky wrote:

[#310190] Re: State of the Onion — "Martin DeMello" <martindemello@...> 2008/08/05

On Mon, Aug 4, 2008 at 8:48 PM, Michael T. Richter <ttmrichter@gmail.com> wrote:

[#310217] perl and the culture of libraries — "Martin DeMello" <martindemello@...>

http://blog.jrock.us/articles/You%20are%20missing%20the%20point%20of%20Perl.pod

60 messages 2008/08/05
[#310219] Re: perl and the culture of libraries — "Peter Fitzgibbons" <peter.fitzgibbons@...> 2008/08/05

I'm on board.

[#310223] Re: perl and the culture of libraries — "Martin DeMello" <martindemello@...> 2008/08/05

On Tue, Aug 5, 2008 at 6:04 AM, Peter Fitzgibbons

[#310228] Re: perl and the culture of libraries — "Peter Fitzgibbons" <peter.fitzgibbons@...> 2008/08/05

Sounds like some changes to rubygems and it's toolset.

[#310232] Re: perl and the culture of libraries — "Martin DeMello" <martindemello@...> 2008/08/05

On Tue, Aug 5, 2008 at 6:31 AM, Peter Fitzgibbons

[#310237] Re: perl and the culture of libraries — "Peter Fitzgibbons" <peter.fitzgibbons@...> 2008/08/05

Isn't it true, though, that rubygems are the defacto distribution model for

[#310240] Re: perl and the culture of libraries — "Martin DeMello" <martindemello@...> 2008/08/05

On Tue, Aug 5, 2008 at 7:05 AM, Peter Fitzgibbons

[#310249] Re: perl and the culture of libraries — Shadowfirebird <shadowfirebird@...> 2008/08/05

I don't wish to be critical (I really don't! That's not just a way of

[#310312] Re: perl and the culture of libraries — David Masover <ninja@...> 2008/08/06

On Tuesday 05 August 2008 07:56:22 Martin DeMello wrote:

[#310339] Re: perl and the culture of libraries — Shadowfirebird <shadowfirebird@...> 2008/08/06

I've seen some things posted in this thread (overnight for me) that I

[#310295] State of Ruby 1.8.6? — Jeff <cohen.jeff@...>

Can anyone provide an update to the state of Ruby 1.8.6?

19 messages 2008/08/05
[#310305] Re: State of Ruby 1.8.6? — Alex Fenton <alex@...> 2008/08/06

Jeff wrote:

[#310314] is there a way to AutoParse a string to another type - e.g. if a Date format then date, else if integer than Integer etc ????? — "Greg Hauptmann" <greg.hauptmann.ruby@...>

Hi,

7 messages 2008/08/06

[#310358] Threaded IO trouble — "Michal Suchanek" <hramrach@...>

Hello

13 messages 2008/08/06

[#310393] An introduction, in about 50 lines of Ruby. — Alexei Broner <lahgyk@...>

Hi, I'm Lex. I've been Rubying for a few months now and can't get

47 messages 2008/08/06
[#310582] Re: An introduction, in about 50 lines of Ruby. — Alexei Broner <lahgyk@...> 2008/08/08

You guys are no fun. I didn't even get "that's not really recursive,

[#310584] Re: An introduction, in about 50 lines of Ruby. — Yukihiro Matsumoto <matz@...> 2008/08/08

Hi,

[#310591] Re: An introduction, in about 50 lines of Ruby. — Trans <transfire@...> 2008/08/08

[#310639] Re: An introduction, in about 50 lines of Ruby. — James Britt <james.britt@...> 2008/08/08

Trans wrote:

[#310731] Re: An introduction, in about 50 lines of Ruby. — Trans <transfire@...> 2008/08/10

[#310740] Re: An introduction, in about 50 lines of Ruby. — James Britt <james.britt@...> 2008/08/10

Trans wrote:

[#310745] Re: An introduction, in about 50 lines of Ruby. — Trans <transfire@...> 2008/08/10

[#310413] Need help detecting overlapping ranges — Bryan Richardson <btrichardson@...>

Hello all,

18 messages 2008/08/06
[#310429] Re: Need help detecting overlapping ranges — "Martin DeMello" <martindemello@...> 2008/08/06

On Wed, Aug 6, 2008 at 11:48 AM, Bryan Richardson

[#310518] Most compact command for associate array 'totalling'? — John Pritchard-williams <monojohnny@...>

Ok - in 'awk' you can do this: (Where 'array' is empty initially)

10 messages 2008/08/07

[#310531] Ruby 1.8.7-p71 / 1.8.6-p286 released (Security Fix) — Urabe Shyouhei <shyouhei@...>

At last.

13 messages 2008/08/08

[#310540] Ruby IDE — "Mayuresh Kathe" <kathe.mayuresh@...>

Hello,

52 messages 2008/08/08
[#310600] Re: Ruby IDE — "Jayson Williams" <williams.jayson@...> 2008/08/08

I like working in NetBeans, but even on the Quad processor computer at

[#310603] Re: Ruby IDE — Dana Merrick <dmerrick@...> 2008/08/08

Jayson Williams wrote:

[#310610] Re: Ruby IDE — "Eric Schulte" <schulte.eric@...> 2008/08/08

To piggy-back on and emphasize the importance of Dana's point,

[#310719] Re: Ruby IDE — "Piyush Ranjan" <piyush.pr@...> 2008/08/09

I second emacs

[#310725] Re: Ruby IDE — "M. Edward (Ed) Borasky" <znmeb@...> 2008/08/09

On Sun, 2008-08-10 at 05:25 +0900, Piyush Ranjan wrote:

[#310726] Re: Ruby IDE — Matt Lawrence <matt@...> 2008/08/09

On Sun, 10 Aug 2008, M. Edward (Ed) Borasky wrote:

[#310733] Re: Ruby IDE — Joshua Ballanco <jballanc@...> 2008/08/10

Matt Lawrence wrote:

[#310814] Re: Ruby IDE — "Martin DeMello" <martindemello@...> 2008/08/11

On 8/9/08, Joshua Ballanco <jballanc@gmail.com> wrote:

[#310580] Non-Threaded Timeout? — Bryan Richardson <btrichardson@...>

Hell all,

30 messages 2008/08/08

[#310837] gem (update ?) problem — Peter Krieg <pk.hot@...>

Hello,

21 messages 2008/08/11

[#310865] Sort array by two attributes? (like sql "order by A, B") — Max Williams <toastkid.williams@...>

IN sql we can pass two arguments to the 'order by' component, and it

9 messages 2008/08/11

[#310921] Problems with accessing directory defined in ENV variables — Thomas Luedeke <thomas.luedeke@...>

Ruby is giving me pure hell trying to access directories on a mounted

10 messages 2008/08/11

[#310947] Sigh! I'm depressed. Debian vs Ruby and the backtick and subshells — John Carter <john.carter@...>

I have just strace'd weird bug to it's root cause.

20 messages 2008/08/12

[#310950] Ruby 1.9: What to Expect by Sam Ruby @ OSCON 2008 Slide Deck Adapted S6/S9 (Single-Web Page) Version — "Gerald Bauer" <geraldbauer2007@...>

Hello,

15 messages 2008/08/12
[#311073] Re: Ruby 1.9: What to Expect by Sam Ruby @ OSCON 2008 Slide Deck Adapted S6/S9 (Single-Web Page) Version — Iki Baz Castillo <ibc@...> 2008/08/12

El Martes, 12 de Agosto de 2008, Gerald Bauer escribi=F3:

[#311080] Re: Ruby 1.9: What to Expect by Sam Ruby @ OSCON 2008 Slide Deck Adapted S6/S9 (Single-Web Page) Version — "Jeremy Kemper" <jeremy@...> 2008/08/12

On Tue, Aug 12, 2008 at 1:36 PM, I=F1aki Baz Castillo <ibc@aliax.net> wrote=

[#311085] Re: Ruby 1.9: What to Expect by Sam Ruby @ OSCON 2008 Slide Deck Adapted S6/S9 (Single-Web Page) Version — Iki Baz Castillo <ibc@...> 2008/08/12

El Martes, 12 de Agosto de 2008, Jeremy Kemper escribi=F3:

[#311086] Re: Ruby 1.9: What to Expect by Sam Ruby @ OSCON 2008 Slide Deck Adapted S6/S9 (Single-Web Page) Version — Iki Baz Castillo <ibc@...> 2008/08/12

El Martes, 12 de Agosto de 2008, I=F1aki Baz Castillo escribi=F3:

[#310988] what do you think of this code? — "Ben Aurel" <ben.aurel@...>

hi

16 messages 2008/08/12
[#310992] Re: what do you think of this code? — Stefano Crocco <stefano.crocco@...> 2008/08/12

On Tuesday 12 August 2008, Ben Aurel wrote:

[#311235] Mutithreading to implement near 7000 to 10000 mssage per min — Kaja Mohaideen <kajamohaideen_2003@...>

Hello,

10 messages 2008/08/14

[#311256] Idiom of removing a particular character from a String? — "Lorenzo E. Danielsson" <danielsson.lorenzo@...>

Hi all,

12 messages 2008/08/14

[#311390] Not So Random (#173) — "Matthew Moss" <matthew.moss@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

20 messages 2008/08/15

[#311427] BDD and TDD - What are they for? — "Clinton D. Judy" <cdj@...>

I'd like someone to give me very basic reasons for why I need Behavior

42 messages 2008/08/15
[#311655] Re: BDD and TDD - What are they for? — paron <rphillips@...> 2008/08/18

On Aug 16, 11:27=A0am, Eleanor McHugh <elea...@games-with-brains.com>

[#311469] firefox html, my downloaded html and firebug html different? — Adam Akhtar <adamtemporary@...>

Hi Im a relatively new rubyist and programmer in general and currently

10 messages 2008/08/16

[#311517] I wish to learn Ruby ,can anyone teach me??? — Amitanshu Gour <amitanshu_gour@...>

I am a beginner in Programming and don't have much idea about any

10 messages 2008/08/16

[#311523] writing if statement in one line with elsif condition — "Luiz Vitor Martinez Cardoso" <grabber@...>

I'm trying to convert it:

10 messages 2008/08/17

[#311553] Matrix: Need help to understand this behavior — Marcio Braga <mbraga0001@...>

a=[1]

10 messages 2008/08/17

[#311571] Security in use of contants — Kless <jonas.esp@...>

Is secure use constants?

40 messages 2008/08/17

[#311668] Hash#each vs Hash#each_pair — "Patrick Doyle" <wpdster@...>

Sorry if this is a FAQ, but I'm curious to learn the rationale behind

12 messages 2008/08/18

[#311803] Cut a string if length > n — Pål Bergström <pal@...>

What's the best way to cut a string if the length is above n characters?

15 messages 2008/08/19

[#311843] Shortest Ruby crash #49 — Limo Driver <melezov@...>

My contribution to the contest:

15 messages 2008/08/19

[#311937] A Mascot... — "Mayuresh Kathe" <kathe.mayuresh@...>

Hi,

100 messages 2008/08/20
[#311969] Re: A Mascot... — Phlip <phlip2005@...> 2008/08/20

Mayuresh Kathe wrote:

[#311979] Re: A Mascot... — "Mayuresh Kathe" <kathe.mayuresh@...> 2008/08/20

On Wed, Aug 20, 2008 at 5:51 PM, Phlip <phlip2005@gmail.com> wrote:

[#311980] Re: A Mascot... — "Michal Suchanek" <hramrach@...> 2008/08/20

On 20/08/2008, Mayuresh Kathe <kathe.mayuresh@gmail.com> wrote:

[#311983] Re: A Mascot... — "Clinton D. Judy" <cdj@...> 2008/08/20

V2hpY2ggaXMgd2h5IGEgZ3JlYXQgZ3JhcGhpYyBkZXNpZ25lciBjb3VsZCBjb21lIHVwIHdpdGgg

[#311984] Re: A Mascot... — "Mayuresh Kathe" <kathe.mayuresh@...> 2008/08/20

Clinton, what's your opinion about http://www.hexley.com/

[#312284] Re: A Mascot... — Karl von Laudermann <doodpants@...> 2008/08/22

On Aug 21, 8:26=A0pm, Joshua Ballanco <jball...@gmail.com> wrote:

[#312302] Re: A Mascot... — "Pablo Q." <paqs140482@...> 2008/08/22

I like it! :D, but If you haven=B4t read all post before please do it,

[#312305] Re: A Mascot... — "Gregory Brown" <gregory.t.brown@...> 2008/08/22

On Fri, Aug 22, 2008 at 1:22 PM, Pablo Q. <paqs140482@gmail.com> wrote:

[#311950] array of hashes - need to iterate and calulate stats but how — Adam Akhtar <adamtemporary@...>

I making a script which generates some basic stats for completed

19 messages 2008/08/20
[#311952] Re: array of hashes - need to iterate and calulate stats but how — Lex Williams <etaern@...> 2008/08/20

something like this :

[#311962] Re: array of hashes - need to iterate and calulate stats but how — "David A. Black" <dblack@...> 2008/08/20

Hi --

[#312026] Iterating through a hash — "Brian Ross" <p.brian.ross@...>

How can I iterate through a hash so that each key is modified and saved into

13 messages 2008/08/20

[#312048] unintuitive language feature (exclamation functions) — Nick Brown <ruby-forum.com@...>

I was surprised to discover that the code

20 messages 2008/08/20
[#312050] Re: unintuitive language feature (exclamation functions) — "F. Senault" <fred@...> 2008/08/20

Le 20 ao皦 2008 21:45, Nick Brown a 馗rit :

[#312054] Re: unintuitive language feature (exclamation functions) — Nick Brown <ruby-forum.com@...> 2008/08/20

F. Senault wrote:

[#312068] "num in [1,2,3,4]" in a cool way? — Iñaki Baz Castillo <ibc@...>

Hi, AFAIK in Ruby the only (or the "coolest") way to do something as:

17 messages 2008/08/20

[#312360] DoS vulnerability in REXML — Shugo Maeda <shugo@...>

Hello,

16 messages 2008/08/23
[#312384] Re: [ANN] DoS vulnerability in REXML — James Britt <james.britt@...> 2008/08/23

Shugo Maeda wrote:

[#312391] Re: [ANN] DoS vulnerability in REXML — "Christopher Dicely" <cmdicely@...> 2008/08/23

On Sat, Aug 23, 2008 at 9:28 AM, James Britt <james.britt@gmail.com> wrote:

[#312411] Re: [ANN] DoS vulnerability in REXML — James Britt <james.britt@...> 2008/08/23

Christopher Dicely wrote:

[#312378] Uptime Since... (#174) — "Matthew Moss" <matthew.moss@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

26 messages 2008/08/23

[#312388] Why 'if 0' succeeds in Ruby — Phlip <phlip2005@...>

Rubiods:

21 messages 2008/08/23

[#312401] Open file, get first line, delete first line close file — Richard Schneeman <thedickster@...>

Hey, i'm trying to open a file, get the first line of the file, delete

17 messages 2008/08/23

[#312482] Moving all files in a folder to another hard drive — SpringFlowers AutumnMoon <summercoolness@...>

I have some code below to move all files in a folder to another hard

14 messages 2008/08/24

[#312573] Regular Expressions — Newb Newb <hema@...>

I have a image url like this <img src

16 messages 2008/08/25

[#312655] Unraveling binary data out of the proc filesystem on Solaris — Daniel Berger <djberg96@...>

Hi all,

13 messages 2008/08/25
[#312679] Re: Unraveling binary data out of the proc filesystem on Solaris — "Heesob Park" <phasis@...> 2008/08/26

Hi,

[#312734] Passing a block with define_method — "James Coglan" <jcoglan@...>

Hi list,

14 messages 2008/08/26

[#312739] MissingSourceFile: no such file to load -- sqlite3/database — Jo縊 Maca兊a <joao.macaiba@...>

Hi,

11 messages 2008/08/26

[#312792] Chris Pine Tutorial 99 Bottles of Beer Program — danielj <sleepingindian@...>

Just a beginner with a question about this:

15 messages 2008/08/26

[#312795] Deaf Grandma — danielj <sleepingindian@...>

Also from the Chris Pine tutorial for beginners:

20 messages 2008/08/27

[#312825] how to avoid passing by reference and how to copy objects — Adam Akhtar <adamtemporary@...>

Hi after a bit of searching and reading im quite confused by this.

12 messages 2008/08/27

[#312839] Difficult Inheritance Problem — Toby Clemson <tobyclemson@...>

Hi all,

15 messages 2008/08/27

[#312875] encrypting password on form submit? — "Amanda .." <a.etherton@...>

Hi there, I'm trying to use a form to create a user for a site. All the

19 messages 2008/08/27

[#312906] Having a difficult time with Case statements. — Chris Bailey <christopher.sean.bailey@...>

I am trying to implement a simple frontend for a text adventure that

12 messages 2008/08/27

[#312989] specifying a network interface, with a http get request — Andrew Parlane <ajp97@...>

Hi all, I'm fairly new to Ruby but have learnt a lot in the last month

13 messages 2008/08/28
[#313071] Re: specifying a network interface, with a http get request — John Pritchard-williams <monojohnny@...> 2008/08/28

Hi Andy,

[#313182] Re: specifying a network interface, with a http get request — Andrew Parlane <ajp97@...> 2008/08/29

Hey John,

[#312990] Beginner help: Problem installing sqlite3 on Windows XP — Kasper Frederiksen <kasper@...>

Hi Everyone,

11 messages 2008/08/28

[#313031] A general doubt — Rock Roll <karoljouis@...>

If I am developing a Windows application in Ruby using FxRuby or WxRuby,

28 messages 2008/08/28
[#313038] Re: A general doubt — Michael Morin <uzimonkey@...> 2008/08/28

Rock Roll wrote:

[#313070] Use a string as a method call — Chris Bailey <christopher.sean.bailey@...>

I'm trying to come up with an efficient way of using user input as a

16 messages 2008/08/28

[#313098] Please don't flame me...why is there no "++" in Ruby again ? — John Pritchard-williams <monojohnny@...>

There's must be very good simple reason why there is no 'x++' method

24 messages 2008/08/28
[#313100] Re: Please don't flame me...why is there no "++" in Ruby again ? — Joel VanderWerf <vjoel@...> 2008/08/28

John Pritchard-williams wrote:

[#313164] Re: Please don't flame me...why is there no "++" in Ruby again ? — David Masover <ninja@...> 2008/08/29

On Thursday 28 August 2008 16:25:59 Joel VanderWerf wrote:

[#313131] Class === — "RubyTalk@..." <rubytalk@...>

I need help with === and Objects

20 messages 2008/08/29
[#313135] Re: Class === — "Patrick Doyle" <wpdster@...> 2008/08/29

and I would also like to know why

[#313196] Computing folder size - do you have something cleaner than this ? — Thibaut Barr鑽e <thibaut.barrere@...>

Hi guys,

11 messages 2008/08/29

[#313242] Where the Required Things Are (#175) — "Matthew Moss" <matthew.moss@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

21 messages 2008/08/29

[#313379] instance_eval/class_eval including/extending modules — Pedro Silva <ei04065@...>

Consider the following example:

14 messages 2008/08/30
[#313401] Re: instance_eval/class_eval including/extending modules — "David A. Black" <dblack@...> 2008/08/31

HI --

[#313428] Re: instance_eval/class_eval including/extending modules — Pedro Silva <ei04065@...> 2008/08/31

David, thanks for your reply.

[#313432] Re: instance_eval/class_eval including/extending modules — "David A. Black" <dblack@...> 2008/08/31

Hi --

[#313399] Difference between dir/**/* and dir/*? — Ben Johnson <bjohnson@...>

I've noticed the following when specifying a wildcard array of files:

14 messages 2008/08/31

Re: unit testing advice

From: "Gregory Brown" <gregory.t.brown@...>
Date: 2008-08-03 21:47:53 UTC
List: ruby-talk #310044
On Sun, Aug 3, 2008 at 5:15 PM, James Gray <james@grayproductions.net> wrote:
> On Aug 3, 2008, at 3:29 PM, James Britt wrote:
>
>> I've been wondering about resistance to "purist" TDD/BDD, and if there's
>> some aspect of "listen to your body" to observe.  For example, when
>> exercising or dieting, there are assorted rules or regimes to follow, but if
>> something is hurting, or if you've constant cravings for some food or
>> another, then maybe that's an important sign to deviate from the original
>> plan, and not simply a lack of will power or a failure to "do it right."
>
> Yeah, I think you are making a lot of sense here.
>
> For example, I haven't been able to get into RSpec.  I know a lot of people
> really like it and it's gained a lot of popularity recently, but it's not
> for me.
>
> The interface just "feels" wrong to me.  To give a random example, I can't
> imagine how I would explain to a programming student something like, "Now we
> can check that valid?() method you just wrote using be_valid()."  I would
> much rather be saying, "OK, let's call valid?() a few times and see if we
> get the results we expect."

I like RSpec in a lot of ways, but this stuff annoys me too.  The
trouble is the lack of bare assertions and the dogmatic assumption
that introducing them could be evil.  But I don't know, my inner
Rubyist and non-conformist asks me, why shouldn't I just be able to do
this?

class Thing
  def valid?
    false
  end
end

def assert(thing)
  (!!thing).should be_true
end

describe "A thing" do
  it "should be valid" do
    @thing = Thing.new
    assert @thing.valid?
  end
end

It's not like this code is hard to follow, but it's annoying that I
need to create a custom hack to support the most basic thing (a simple
assert).

But hacking in some less magic alternatives to RSpec isn't exactly
appealing.  Things like Shoulda and test/spec and friends already do
that.  What I'd really want in Test::Unit to make it feel like a good
solution 'out of the box' is:

* Some standard mocking library - Mocha is very pretty IMO, but any would do

* Full Test::Unit compatibility to play nice with the massive amount
of pre-existing tests out there

* Flexibility to extend the framework to go in the direction *I* want
it to.  I'm personally quite sick of people telling me that I'm doing
something wrong because it doesn't read like English, or because I use
a setup method that creates a 'dependency' between the tests.  Though
these are valid conversations to have, people need to stop acting like
there are established laws, and should give us the freedom to bend our
tools to our work flow, not the other way around.

* The ability to specify my test cases as strings rather than methods
like test_something_should_do_something

* The ability to have contexts and nested contexts.

* Nice built in extras to do pretty HTML reports, coverage reports, etc.

I know there are some efforts heading in this direction, but I feel
like standard Ruby should really ship with something that accomplishes
all of the above.  I don't hate BDD style syntax, but it's the last
reason why I use RSpec.  The lack of compatibility with other testing
tools creates a divide that I don't like, too.

It mostly seems that people who are accustomed to Test::Unit are more
tolerant and willing to write specs if necessary, but that BDD
advocates who are convinced they've learned "The One True Way" of
doing things really have a strong aversion to going back to xunit
style syntax.  Seems like a mental hangup to me.

Anyway, what I've said applies only to a small percentage of people
I've encountered in the community, but they have seemed to be quite
vocal.

I am mostly thinking that RSpec owes a huge chunk of its success to
its glittering side-features, and not the BDD syntax magic.  I wonder
if others feel the same way.

-greg

In This Thread