[erlang-questions] rebar and eunit test prep

Eric Merritt ericbmerritt@REDACTED
Wed Jun 22 21:42:17 CEST 2011


Bob has advice for how to do this in rebar.

However, you want your unit tests to be small and focused. They
shouldn't need mnesia started to run, mock up the mnesia calls with
meck.

These are more integration tests then unit tests, for that use
something along the lines of common test.

This distinction between self contained unit tests that just focus on
the module functionality and then broader integration tests is an
important one.

Eric

On Wed, Jun 22, 2011 at 2:14 PM, Joel Reymont <joelr1@REDACTED> wrote:
> Suppose my eunit tests require mnesia to be started and a schema to be installed.
>
> How do I incorporate that into ./rebar eunit such that the setup above is done only once?
>
> I definitely don't want to start mnesia and install the schema before every test.
>
>        Thanks, Joel
>
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list