ErlyORM / boss_db

BossDB: a sharded, caching, pooling, evented ORM for Erlang
Other
277 stars 138 forks source link

Fixed boss_db_rebar plugin to compile boss_db models before eunit #154

Closed drobakowski closed 10 years ago

drobakowski commented 10 years ago

I don't know if it's just an configuration problem from my side, but otherwise it seems that it's currently not possible to unit test OTP applications with eunit which depend on boss_db/models. pre_compile/2 is only executed with rebar compile hence models doesn't get compiled with rebar eunit. With this fix I've implemented pre_eunit/2 for the boss_db rebar plugin which compiles the models and save them to the .eunit folder instead of ebin.