buildr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Assaf Arkin <>
Subject Where do we put specs: src/test or src/spec?
Date Thu, 21 Feb 2008 20:45:51 GMT
Here's an interesting issue brought up on JIRA, and I like to move it  
to the mailing list, since not all of you are following issue 29 [1].

Daniel Roop:

   Not sure where you guys stand on this issue, but I was going to  


   This seems to be a compromise between maven convention and rails  

   In a rails project when you write specs instead of a


   you have a


   so in maven instead of src/test you have src/spec


   As you can see, regarding directories for ruby based tests/specs, I  
was thinking of using a single directory src/test/ruby

   *_test would be rubyUnit
   *_spec would be rspec examples.

A few observations of my own.

The conventions we use in Buildr are descendants of many generations  
of working with various open source projects, mostly at Apache, and  
date back to the early days of Ant.  I picked those up because I think  
they work very well and had good experience with them on projects big  
and small.  Compatibility with Maven 2 was an important feature, but  
not the top priority.

Something unique to Buildr is the wide language diversity and some new  
development practices that we're adopting as first class citizens.  So  
we have to accept that at some point we'll be making and following our  
own conventions.

Unfortunately the best conventions are revealed over time, making them  
in advance is always a tricky proposition.  That's why I think we a  
show of hands before deciding either way.

Personally, I like to make a distinction between unit tests and specs,  
even though I only use one or the other on any given projects [2].   
That convention comes from using RSpec, which also happens to be a  
source of influence to many other BDD test frameworks.  Another one to  
look at is JBehave [3], although I can't tell if they have any  
conventions for directory structure.

I happen to think it's useful to keep that distinction, so I would  
like to see us using src/test for unit tests and src/spec for specs.   
I don't know if everybody would like that.  What do you think?


[2] Early on Buildr actually had a test directory (now spec), but that  
was following a common Gem packaging convention and ignoring the RSpec  

View raw message