Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

vars are allowed inside contexts

  • Loading branch information...
commit 655337af8e435ebe92b1fe8917636d2886d9dcc6 1 parent 9170236
@slagyr authored
View
3  examples/basics/calulator_spec.clj
@@ -2,10 +2,11 @@
(:use [speclj.core]))
-(declare ^:dynamic *the-answer*)
(describe "Calculator"
+ (declare ^:dynamic *the-answer*)
+
(before (println "A spec is about to be evaluated"))
(after (println "A spec has just been evaluated"))
(before-all (println "May the spec'ing begin!"))
View
4 src/speclj/components.clj
@@ -13,6 +13,10 @@
(install [this description]
(throw (Exception. (str "Oops! It looks like you tried to add 'nil' to a spec. That's not allowed.")))))
+(extend-type clojure.lang.Var
+ SpecComponent
+ (install [this description] (comment "Vars are cool. Let them pass.")))
+
(extend-type clojure.lang.Seqable
SpecComponent
(install [this description]
Please sign in to comment.
Something went wrong with that request. Please try again.