lucaspiller/twerl — pull request #1 by llaisdy (2012-08-29 11:13:04+00:00)
Title: https instead of http; jiffy instead of mochijson; *_tests instead of *_test

Dear Luca Spiller

I'm using your twerl and I've made a few changes so I thought I'd send a pull request.

1. Twitter wouldn't accept requests without https;

2. I've switched to using jiffy instead of mochijson2. Mainly as I'm a bit more familiar with it (haven't seen mochijson2 about much recently);

3. The tests in test/*_test.erl didn't seem to be picked up by eunit, and the erlang docs say use _tests.erl (see below). I renamed the modules and the number of tests passing went up by about 20.

Thanks very much for your work on twerl!

Best wishes

Ivan

p.s. This is my first pull request, so many apologies for verbosity and any breaches of etiquette.

http://www.erlang.org/doc/apps/eunit/chapter.html

** Putting tests in separate modules

If you want to separate your test code from your normal code (at least for testing the exported functions), you can simply write the test functions in a module named m_tests (note: not m_test), if your module is named m. Then, whenever you ask EUnit to test the module m, it will also look for the module m_tests and run those tests as well.