Skip to content

Commit

Permalink
Leiningen build scheme, updated README.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcgrana committed Dec 24, 2009
1 parent 5e6da6f commit 3a91843
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 42 deletions.
52 changes: 26 additions & 26 deletions README.textile → README.md
@@ -1,33 +1,34 @@
h1. clj-unit
`clj-unit` is a simple unit testing library for Clojure. The goal of `clj-unit` is to provide a non-magical, developer-friendly unit testing API along with a wide variety of assertion helpers.

@clj-unit@ is a simple unit testing library for Clojure. The goal of @clj-unit@ is to provide a non-magical, developer-friendly unit testing API along with a wide variety of assertion helpers.

h2. Features
Features
--------

* Extremely small core implementation with a simple interface.
* Pluggable reporters, with a built-in console reporter that uses "clj-stacktrace":http://github.com/mmcgrana/clj-stacktrace to provide trimmed, cleaned, and colorized backtraces on unit test errors.
* Pluggable reporters, with a built-in console reporter that uses [clj-stacktrace](http://github.com/mmcgrana/clj-stacktrace) to provide trimmed, cleaned, and colorized backtraces on unit test errors.
* Stateless facade for reporters, eliminating the need for them to maintain their own global state.
* Many built in assertions.
* New assertions can be implemented as stand-alone functions; they don't need to be methods or macros.

h2. Available Assertions

* @assert=@
* @assert-not=@
* @assert-in-delta@
* @assert-that@
* @assert-not@
* @assert-nil@
* @assert-fn@
* @assert-not-fn@
* @assert-instance@
* @assert-isa@
* @assert-match@
* @assert-throws@
* @flunk@ (always fails)
* @success@, @failure@, @assert-truth@ (for defining custom assertions)

h2. Example Usage
Available Assertions
--------------------

* `assert=`
* `assert-not=`
* `assert-in-delta`
* `assert-that`
* `assert-not`
* `assert-nil`
* `assert-fn`
* `assert-not-fn`
* `assert-instance`
* `assert-isa`
* `assert-match`
* `assert-throws`
* `flunk` (always fails)
* `success`, `failure`, `assert-truth` (for defining custom assertions)

Example
-------

(ns myapp.utils-test
(:use clj-unit.core))
Expand All @@ -46,8 +47,7 @@ h2. Example Usage

(run-tests 'myapp.utils-test)

Also, @clj-unit@ is used by the "Weld":http://github.com/mmcgrana and "Ring":http://github.com/mmcgrana/ring projects, both of which have substantial test suites: these would good places to look for production usage examples.

---
License
-------

Copyright 2009 Mark McGranaghan and released under an MIT license.
16 changes: 0 additions & 16 deletions build.xml

This file was deleted.

7 changes: 7 additions & 0 deletions project.clj
@@ -0,0 +1,7 @@
(defproject clj-unit "0.1.0-SNAPSHOT"
:description "A simple unit testing library for Clojure."
:url "http://github.com/mmcgrana/clj-unit"
:dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"]
[org.clojure/clojure-contrib "1.0-SNAPSHOT"]
[clj-stacktrace "0.1.0-SNAPSHOT"]]
:dev-dependencies [[lein-clojars "0.5.0-SNAPSHOT"]])

0 comments on commit 3a91843

Please sign in to comment.