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
suggest
src/spec/java
src/spec/scala
etc...
This seems to be a compromise between maven convention and rails
convention.
In a rails project when you write specs instead of a
/test
you have a
/spec
so in maven instead of src/test you have src/spec
Victor:
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?
Assaf
[1] https://issues.apache.org/jira/browse/BUILDR-29
[2] Early on Buildr actually had a test directory (now spec), but that
was following a common Gem packaging convention and ignoring the RSpec
convention.
[3] http://jbehave.org/documentation/the-story-framework/