Permalink
Browse files

More version checks

  • Loading branch information...
1 parent 7dd02af commit ed409437066ae52ab867ef6de6e1e66165f89343 @marick committed Jan 29, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/midje/util/ecosystem.clj
@@ -1,6 +1,7 @@
(ns ^{:doc "Environmental factors."}
midje.util.ecosystem
(:require [clojure.string :as str]
+ midje.clojure.backwards-compatibility
[leiningen.core.project :as project]))
(def issues-url "https://github.com/marick/Midje/issues")
@@ -22,6 +23,14 @@
(when-not (= 2 (:minor *clojure-version*))
`(do ~@body)))
+(defmacro when-1-3- [& body]
+ (when (< (:minor *clojure-version*) 4)
+ `(do ~@body)))
+
+(defmacro when-1-4+ [& body]
+ (when (>= (:minor *clojure-version*) 4)
+ `(do ~@body)))
+
(defmacro unless-1-2-0
"Skip body completely - including 'Unable to resolve classname' errors."
[& body]

0 comments on commit ed40943

Please sign in to comment.