[rspec-users] validate_presence_of

Stephen Eley sfeley at gmail.com
Thu Feb 19 11:40:39 EST 2009

On Thu, Feb 19, 2009 at 9:55 AM, David Chelimsky <dchelimsky at gmail.com> wrote:
> On Wed, Feb 18, 2009 at 11:40 PM, Stephen Eley <sfeley at gmail.com> wrote:
> <deliberately_out_of_context_to_make_a_point>
>> If your spec breaks because you changed a method call, you're not
>> testing behavior any more.  You're testing syntax.
> </deliberately_out_of_context_to_make_a_point>
> We've got to stop making laws out of guidelines. This is a very
> general statement about what is really a very specific situation, and
> it is not in any way as black and white as this statement sounds. But
> *somebody* is going to read this, not understand the context, and
> think it's international law.

Doesn't it increase the probability that someone will read it and not
understand the context when you deliberately take it out of context to
make a point?  >8->

Anyway, I wasn't declaring any laws.  I didn't say "specs must never
break when method calls change."  That would be an impossible
standard, since at some point *everything* comes down to a method
call.  I actually didn't express any imperatives at all.

I will agree that "You're not testing behavior any more" is a bit of
an overblown statement, since the line between 'behavior' and 'syntax'
is highly subjective.  Every test is really a test on both.  I was
expressing my own opinion on where I feel the line is drawn, but it
was mostly in response to "You have to do *this*, right?"

There's a lot of testing dogma out there.  I'm starting to think
everyone who gets vocal on the subject lapses into sounding dogmatic
eventually...including, apparently, myself.  To the extent that I
sounded like I was trying to hand down the One True Way, I apologize
and withdraw my fervor.

Have Fun,
   Steve Eley (sfeley at gmail.com)
   ESCAPE POD - The Science Fiction Podcast Magazine

More information about the rspec-users mailing list