[rspec-users] array order-agnostic matching?

James OBrien james at rapleaf.com
Tue Feb 1 23:41:34 EST 2011

Sorry but I disagree.

Specs should define only the external behavior of an object or service -
allowing for confident implementation adjustments against a trusted suite of

What you're describing would make refactoring very hard. I think what you
say goes against a lot of established theory and best practise.

I would like to draw this back to the original question

Take care


On Feb 1, 2011 8:16 PM, "Julian Leviston" <julian at leviston.net> wrote:

Sorry it was a knee-jerk reaction that was prompted by what you wrote, but
not necessarily even connected to it.

Essentially, I've been wondering/thinking about this for a very long time
(since about 15 years ago when I started writing smalltalk code).

I think a general principle of code is that it should be specced from the
inside out and simultaneously from the outside in.

We have things like cucumber to generally spec from the outside in (ie
define an interface according to the "user" what or whoever that may be),
and we have things like rspec to spec from the inside out....

...however inside-out specs should be built inline with the code they spec,
surely? I mean, just like you *should* have comments and documentation built
in, the spec should almost build a bridge from the documentation to the

It seems rspec is incredibly close to this, much closer than cucumber is to
be a very useable outside-in spec system.

Essentially I'd stipulate a flow of development that went something like

1. Plan
2. Put Plan and Documentation in source code with placeholders
3. Build Spec
4. Build Code

An architecture that, when bootstrapped, tests itself to make sure it's not
borked before the code runs. (ie it does self-check on startup,


On 02/02/2011, at 2:36 PM, James OBrien wrote:

> I don't fully understand this response..
> The...

rspec-users mailing list
rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110201/b50ec4ce/attachment.html>

More information about the rspec-users mailing list