===== ESpec ===== (C) 2008-2009 Lewis R. Evans IV A more sensible unit testing framework for erlang. First and foremost, it's important to note that this uses Erlware.org's Sinan, so if you want to be able to build/install it, you will need Faxien and Sinan installed. Mainly, once you've built and installed the release, you should be able to run ESpec on any of your projects by simply changing to the project's directory and running the 'espec' command. === How does this differ from EUnit? Does it replace EUnit? === All your eunit tests will still work - it doesn't replace EUnit. One of the major goals of the project is 100% compatability with EUnit - this isn't going to change. Also, feel free to mix and match. Your test modules can contain EUnit type tests - and they'll work just the same as normal. ESpec offers two things EUnit doesn't: - Currently Sinan doesn't support separate test modules in the 'test' directory ESpec fixes that. - The ?specify macro - which allows you to design tests which are more semantic and clearer in intent - with more descriptive failure messages. === How do I write a new test? === You write tests on an app-by-app basis. Sinan already divides your release into different applications (usually in the 'lib' dir of your project). In each applications directory you have the usual folders: 'ebin', 'include', 'src', etc. All you need to do is create a new directory called 'test', and put your test modules in it. Make sure your test modules include 'espec.hrl' - and that's it - espec will do the rest. For an example that ESpec actually uses to test itself - check out: lib/espec/test/espec_test.erl