[rspec-devel] [ANN] RSpec 0.9.1 released

Nick Kallen nick at pivotalsf.com
Sun May 6 15:36:39 EDT 2007

Not to get into a semantic argument but...

I've long complained that Rspec's are not specs but examples. A
specification is a formal, complete description of all possible behaviors of
a program. A spec of fib, for example is like

Forall n > 1, fib(n) == f(n-1) + fib(n-2)

Or for a sort algorithm,

Forall array s.t., array.length > 0, For all j. s.t. 0 < j < array.length,
let array' = array.sort in array'[j] < array'[j+1]

The unfortunate thing about specifications is that they are usually
non-executable. However, you can prove the a program corresponds to a
specification using formal methods (i.e., proofs).

The idea that specifications "provoke" a program is a misleading way of
putting it.

On 5/6/07, Chad Woolley <chad at pivotalsf.com> wrote:
> On 5/5/07, Brian Takita <brian.takita at gmail.com> wrote:
> > I think the following quote is the gist of the terminology change:
> > >
> > >
> > > Still, it creeps me out when people refer to tests (aka examples) as
> > specifications. There's an important distinction:
> > > A specification describes a correct program, while a test provokes a
> > correct program.
> http://en.wikipedia.org/wiki/Whatever_%28slang%29#Cultural_impact
> >  That's why example are used instead of specifications. So maybe the
> > question now is why is example better than test?
> > Also, why is 'describe' replacing 'context'? The quote implies we don't
> want
> > to describe software, but provoke the correct software.
> I dunno.  I still don't get it.  The more I think about it, the more I
> just want to go back to "test".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070506/39923ecd/attachment.html 

More information about the rspec-devel mailing list