[rspec-devel] directory structure/naming

Zach Dennis zach.dennis at gmail.com
Mon Sep 22 21:36:29 EDT 2008


On Mon, Sep 22, 2008 at 12:30 PM, linojon <linojon at gmail.com> wrote:
>
> On Sep 22, 2008, at 12:20 PM, Ben Mabey wrote:
>
>> David Chelimsky wrote:
>>>
>>> Hey all - we seem to have landed on "features", "scenarios" and "code
>>> examples" as the proper names for talking about ... well ... features,
>>> scenarios and code examples. If you don't know what I mean by those
>>> things, then maybe we still have a problem, but I'm guessing most of
>>> you do.
>>>
>>> So I'm thinking of a new directory structure:
>>>
>>> app-root
>>>
>>>> behaviour
>>>>
>>>>> code-examples
>>>>> features
>>>>>
>>>
>>> I've always wanted to group these things together, but
>>> behaviour/examples never worked for me as behaviour/code-examples
>>> does.
>>>
>>> WDYT?
>>> _______________________________________________
>>> rspec-devel mailing list
>>> rspec-devel at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/rspec-devel
>>>
>>
>>  I really like the idea of grouping the two in a 'behaviour' directory.
>> I tend to have helpers that I use in both my examples and my features so
>> placing them both in the same directory makes sense from an organization
>> point of view.  (Plus, I really like having the name be 'behaviour'--
>> even if it is spelled wrong. :p)
>>
>> I agree that the term code-examples is far less ambiguous than just
>> plain 'examples'.  The fact that we refer to them as examples and even
>> rspec internally treats them as examples does beg the question on how we
>> got stuck with specs in the first place.  While I like the idea of
>> code-examples I think that will be a much harder transition because so
>> many people are used to the name 'spec' at this point (including
>> myself.)  What is the main argument for ditching spec in favor of
>> code-example?  Less baggage?
>>
>> -Ben
>
> features is to scenarios
> as
> specs is to examples
>
> therefore the directories:
>
> behaviour
>        features
>        specs
>
> besides, i like less typing
> :)

Have we learned nothing from prioritizing the number of characters
over a meaningful name? :)

Any good shell will tab auto-complete anyways, and in an actual IDE
you almost never have actually type in the name of the directory
unless you're creating it.

I like:

behaviour
   examples
   features

I think "code" communicates poorly. I like "code-examples", but I
think if we drop "code" the same intent is expressed. I know that like
"specs" whatever becomes convention will be cemented in everyone's
heads very shortly. But while we're trying to get the words right,
let's try to get the words right.

-- 
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com


More information about the rspec-devel mailing list