I’m using minitest-rails on my newer projects and I liked the structure you picked. It makes it easy to add tests for things like serializers (test/serializers), commands, etc. I think this would be a more reasonable choice of naming for new projects. I just don’t know how this is going to impact existing projects and the rest of the ecosystem.
This is similar to rspec structure which I really like. I believe your proposal being less generic and better fitted to the rails use case is a very nice one.
I'm personally in favor of what you've proposed. I'm starting a
discussion with other Rails core members about it.
In case we decide to accept the changes we should be keeping
compatibility with the old schema. Only new apps should be using this
and old apps should continue working. We can probably show a message
saying that there's a new directory schema for tests.
What do you think?. Will you be able to provide a patch for all that?.
This is probably quite obvious, but I thought I’d point it out anyways. One big advantage of this schema is that there is a one-to-one corresponding between the content of the /app directory and the /test directory. This makes a lot of things very straightforward. For instance, when using guard to do automated testing, this is all you need in your Guardfile:
I'm personally in favor of what you've proposed. I'm starting a
discussion with other Rails core members about it.
In case we decide to accept the changes we should be keeping
compatibility with the old schema. Only new apps should be using this
and old apps should continue working. We can probably show a message
saying that there's a new directory schema for tests.
What do you think?. Will you be able to provide a patch for all that?.
Yep. The minitest-rails project has similar goals and is intended to
live side-by-side with existing tests. The biggest issue is the rake
tasks, but its certainly doable.