Skip to content

Instantly share code, notes, and snippets.

@noahlz
Created November 14, 2011 00:21
Show Gist options
  • Save noahlz/1362960 to your computer and use it in GitHub Desktop.
Save noahlz/1362960 to your computer and use it in GitHub Desktop.
Running fix-clj unit tests in the repl without using lein test - see http://nakkaya.com/2009/11/18/unit-testing-in-clojure/
; SLIME
user>
user> (load-file "c:/projects/github/fix-clj/src/fix_clj/core.clj")
#'fix-clj.core/next-value-and-rest
user> (load-file "c:/projects/github/fix-clj/test/fix_clj/test_core.clj")
nil
user> (use ['fix-clj.core 'fix-clj.test_core] :reload-all :verbose)
; Evaluation aborted.
user> (use '[fix-clj.core fix-clj.test_core] :reload-all :verbose)
; Evaluation aborted.
user> (use '[fix-clj.core] :reload-all :verbose)
(clojure.core/load "/fix_clj/core")
(clojure.core/in-ns 'user)
(clojure.core/refer 'fix-clj.core)
nil
user> (use '[fix-clj.test_core] :reload-all :verbose)
(clojure.core/load "/fix_clj/test_core")
(clojure.core/load "/fix_clj/core")
(clojure.core/in-ns 'fix-clj.test_core)
(clojure.core/refer 'fix-clj.core)
(clojure.core/load "/clojure/contrib/test_is")
(clojure.core/load "/clojure/test")
(clojure.core/load "/clojure/walk")
(clojure.core/in-ns 'clojure.contrib.test-is)
(clojure.core/alias 'walk 'clojure.walk)
(clojure.core/in-ns 'fix-clj.test_core)
(clojure.core/refer 'clojure.contrib.test-is)
(clojure.core/in-ns 'user)
(clojure.core/refer 'fix-clj.test_core)
nil
user> (run-tests 'fix-clj.test_core)
Testing fix-clj.test_core
Ran 4 tests containing 12 assertions.
0 failures, 0 errors.
{:type :summary, :test 4, :pass 12, :fail 0, :error 0}
user>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment