Permalink
Browse files

Introduce clojurewerkz.support.testing/when-not-ci

  • Loading branch information...
michaelklishin committed Jul 26, 2012
1 parent 04aa6b6 commit 12a9916c8445c10877e9a934de9c43b4ed773f99
Showing with 28 additions and 0 deletions.
  1. +16 −0 ChangeLog.md
  2. +12 −0 src/clojure/clojurewerkz/support/testing.clj
View
@@ -1,3 +1,19 @@
+## Changes between ClojureWerkz Support 0.7.0 and 0.8.0
+
+### clojurewerkz.support.testing/when-not-ci
+
+`clojurewerkz.support.testing/when-not-ci` is a macro that evalutes provided forms if the
+`CI` env variable is not set:
+
+``` clojure
+(when-not-ci
+ (deftest test-something
+ ;; do something that only can be tested in the local environment
+ ;; but not on travis-ci.org and so on
+ (is (= 1 2)))
+```
+
+
## Changes between ClojureWerkz Support 0.6.0 and 0.7.0
### clojurewerkz.support.string/from-byte-buffer
@@ -0,0 +1,12 @@
+(ns clojurewerkz.support.testing)
+
+
+;;
+;; API
+;;
+
+(defmacro when-not-ci
+ "Evaluates given forms when the CI env variable is not set"
+ [& forms]
+ `(when-not (System/getenv "CI")
+ (do ~@forms)))

0 comments on commit 12a9916

Please sign in to comment.