Hi Kevin,
Sorry for the delay. Google Groups flagged this message a potential
spam (no idea why).
It's a good question, and one that isn't at all obvious.
Due to the unusual Nitrogen directory structure (with the site
directory containing code and static data), to make eunit work you're
going to need to make one change to your rebar.config:
Add the line:
{recursive_cmds, [eunit]}.
This line tells rebar to run eunit in recursive directories
Then, you're going to want to run:
./rebar skip_deps=true eunit
skip_deps=true will prevent it from running eunit on all your dependency apps.
Or to take it a step further, you can modify your makefile to add a
"test" rule as follow:
test: get-deps compile
@(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using
Erlang in `which erl`"; $(REBAR) skip_deps=true eunit)
Then `make test` will properly run not only any tests in the modules
in site/src but also you can use site/test for your test files.
At some point, all this worked without the above tweaks, but I'm not
sure what changed in rebar exactly to prevent it from running the
tests, but it's no big deal - I will take some time to document this
process (and include some default rules) for the next Nitrogen release
(either 2.3.2 or 2.4).
Hope that helps,
> --
> You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
nitrogenweb...@googlegroups.com.
> To post to this group, send email to
nitro...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/nitrogenweb.
> For more options, visit
https://groups.google.com/d/optout.
--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 ||
sigma-star.com || @jessegumm