[rspec-users] RSpec style and truthiness

Ben Mabey ben at benmabey.com
Fri Mar 20 10:42:27 EDT 2009

Stephen Eley wrote:
> 2009/3/19 Rick DeNatale <rick.denatale at gmail.com>:
>> Even 'should be' is a bit grating.  I'm tempted to write a pair of matchers
>> like be_truthy and be_falsy, but I was wondering what other RSpec users have
>> to say.
> should be || should_not be: that is the expectation:
> Whether 'tis nobler in the parser to interpret
> The outputs and side effects of outrageous duck typing,
> Or to inherit against a sea of matchers
> And by declaration extend them?  To fail: to raise;
> No more; and by a raise to say we throw
> The exception and the thousand natural returns
> The code is heir to, 'tis a specification
> Devoutly to be wished.  To fail: to raise;
> To raise, perchance to rescue: ay, there's the rub,
> For in that state of exception what tests may fail
> When we have injected in this matcher code
> Must give us pause: there's the RSpec
> That makes calamity of such long backtraces;
> For who would bear the Flogs and Heckles,
> The oppressor's Reek, the proud man's Cucumber,
> The pangs of despised Rcov, the spec_server's Drb,
> The insolence of Autotest and the spurns
> That patient merit of the occasional Rakes,
> When he himself might his validation make
> With a bare assertion?  .....
> (...And so forth.  All of which is to say, before my Muse molested me,
> that I rather _like_ the sparse "should be" and "should_not be" specs.
>  Simple is good, and there's a poetry about them.  Keep 'em!)

That is just great.  You have quite the talent.  On another mailing list 
we were talking about the standard story templates and it was suggested 
that we write the stories in prose to make them more interesting to 
read.  Alistair Cockburn came up with this funny little limerick after 
reading Liz Keogh's post about CAPTCHA[1]:

A spunky young buyer named Spry
   Went online to buy something fly
      But he found that a bot
      Had taken his spot
   Now he'll fill out a captcha and not cry



More information about the rspec-users mailing list