nahiluhmot/specl — pull request #1 by nahiluhmot (2013-04-30 00:16:54+00:00)
Title: Add contexts

@tlunter Added a `context` macro that creates a new test environment. The syntax looks something like this:
```lisp
(context "outer"
(before (format t "before~%"))
(after (format t "after~%"))
(def my-definition (+ 1 2))
(it "works"
(unless (= my-definition 3)
(error "unexpected")))
(context "inner"
(def lol "funny business")
(it "works too"
lol)))
```
Much like RSpec, each `before`, `after`, and `def` in a `context` is available in its children. Also, an `it` will fail if the enclosed body raises an error. However, `def` is not an exact copy of RSpec's `let`. Instead of caching the value of a definition, the entirety of the code is performed every time. I'm not sure if I want to keep this library's behavior consistent with RSpec, or keep it the way it is since it feels more 'Lispy'.

As of right now, there is nothing that will keep track of all of the passing/failing tests. Instead, they will just run when they are loaded. In the future, there will be a runtime data structure to handle this.

The next piece I plan on implementing is an `expect` macro, which will raise an error if an expectation is not met.