[rspec-devel] need help getting a word right

Ian Dees undees at gmail.com
Thu Jul 19 13:58:39 EDT 2007

> _____ minds think alike (fill in the blank - and "great" is not allowed).

If I have to fill in the blank, can I use the word "blank?"

> > it.must do
> >   @thing.should be_something
> > end
> If we were to do something like that we would probably use should:

I considered that, too, but didn't know how to say it in my original
message without sounding like Who's On First ("we could use should,
but not like should inside the should block, but should outside a
should block").  Would the "double should" sound okay?

it.should {@thing.should be_something}

Of the ones I've seen, I've liked these the most:

> virtue {@thing.should be_something}
> say {@thing.should be_something}
> allege {@thing.should be_indicted}

"say" is used by Hackety Hack -- don't know whether or not that matters.

Will you forgive a brain dump here, so I can get a handle on my
thoughts?  It seems like the submissions have followed three main

1) Noun: facet, virtue, and so on.  The advantage is that, a noun next
to "do" is a common enough idiom in Ruby that these look equally good
with braces or with "do."

2) Active verb: say, allege, specify.  These look fantastic with
braces, but can be a bit jarring if the word "do" follows without an
intervening parameter.

3) Pronoun with verb, probably a modal verb: it.should, it.must,
it.will, or the lolcat version ("i.can.has_rspec?").

What about 3), with a carefully chosen couple of optional verbs?  That
way, we can have:

it {@thing.should be_something}


it.does {@thing.should be_something}


it.will do
  @thing.should be_something

I lean toward having _all_ the examples start with "it" as the
unifying factor, but injecting a verb would allow us to avoid the "it
do" jawbreaker.

But I could also enjoy using "example:"

describe 'A thing' do
  example {@thing.should be_something}


More information about the rspec-devel mailing list