Skip to content

nchurch/clojure-test-writer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Usage:
use t to enter code at REPL, s to save it as a test to a file:

=> (t (+ 1 5))
6
=> (s)

writes
(clojure.contrib.test-is/is (clojure.core/= (+ 1 5) 6))
to test file

Pass an argument to s to specify the result of the test;
(s 7) would write
(clojure.contrib.test-is/is (clojure.core/= (+ 1 5) 7))

Call (load-file <testfile>) on the test file to run all the tests; the default test file 
is ~/.test-writer/test, which can be changed by setting *testfile*.
(The expression and value to be written by s are saved by t in 
*last-expr* and *last-val*, and can be read by calling (r).) 

Missing features: different files by namespace, integration with existing test frameworks.

About

Automated writing of tests for Clojure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published