Eunit test generators

Garrett Smith g at
Fri Jul 22 19:05:09 EDT 2011

On Fri, Jul 22, 2011 at 4:39 PM, Garrett Smith <g at> wrote:
> I have a test module that uses a test generator -- I need a
> setup/cleanup fixture.
> I'm able to run the test fine when I explicitly specify the suite:
> rebar eunit suite=my_tests
> However, when I run the general command:
> rebar eunit
> the test isn't executed.

This has nothing to do with generators.

This is a test that doesn't have a corresponding module. E.g. the test
is "foo_tests" but there's no "foo" module.

I raised this issue earlier and the line is that "this is the way eunit works".

Not really. If I want to run a test module under eunit, I can simply
call eunit:test/1,2.

Is there some reason rebar doesn't just run everything in "test"? If
something can't be tested because it doesn't export test/0, just skip


More information about the rebar mailing list