dantswain / mix_eunit

A mix task to execute eunit tests.
MIT License
17 stars 10 forks source link

Start the application before running the tests #7

Closed toland closed 8 years ago

toland commented 8 years ago

This mimics the behavior of exunit and turns out to be really useful. If that behavior isn't what is wanted, it can be disabled by passing --no-start.

dantswain commented 8 years ago

Hm, I like the idea of this but I think it might be better to have it disabled by default. People who have existing eunit tests probably have code already that starts their apps or supervisors during setup. That is, after all, one of the "fun" parts of Erlang that Elixir improved upon ;)

It might be best to have a command line option as well as a setting that can be specified in the mix project config (i.e., so you can set it at a project level instead of having to pass in the command line argument every time).

toland commented 8 years ago

That is a good point. I think we would want a setting in the mix.exs file since you are likely to want that every time. It shouldn't be hard to implement.

toland commented 8 years ago

I know how to do this cleanly, but I am afraid that the solution is involved enough that it will cause merge conflicts with the other open PRs. What I would like to do is see if we can't get a couple of the other open PRs merged, then I can update this branch from master and keep the PR easily mergeable.

dantswain commented 8 years ago

Makes sense to me. I'll try to be responsive.

dantswain commented 8 years ago

Merged #5 should be able to merge #8 with some suggested refactoring. Feel free to hit me on elixir-lang slack - @dantswain there.

toland commented 8 years ago

The application start is now disabled by default and you can set options in the mixfile.

dantswain commented 8 years ago

I think this all looks good. I hate to keep dragging you along @toland but could you update the README wrt the new options and defaults?

toland commented 8 years ago

No worries. I will update the docs now. Shouldn't take a moment.

toland commented 8 years ago

Done.

dantswain commented 8 years ago

:+1: Thanks!