basho/rebar — pull request #282 by ostinelli (2012-07-29 02:59:39+00:00)
Title: Added 'tests' filter for eunit suites

Following implementation discussion in issue #250.

To summarize, consider the following setup:

`myapp_mymod.erl`
```erlang
-module(myapp_mymod).
-export([myfunc/0]).
-include_lib("eunit/include/eunit.hrl").
myfunc() -> ok.
myprivate_test() -> ?assert(true).
```

`myapp_mymod_tests.erl`
```erlang
-module(myapp_mymod_tests).
-compile([export_all]).
-include_lib("eunit/include/eunit.hrl").
myfunc_test() -> ?assertMatch(ok, myapp_mymod:myfunc()).
```

`rebar eunit suites=myapp_mymod` will run:

* `myapp_mymod:myprivate_test/0`
* `myapp_mymod_tests:myfunc_test/0`

`rebar eunit suites=myapp_mymod tests=my` will run the first match:

* `myapp_mymod:myprivate_test/0`

`rebar eunit suites=myapp_mymod tests=myfun` will run the first match (available in _tests module):

* `myapp_mymod_tests:myfunc_test/0`