Permalink
Browse files

Added extra &rest arg test

  • Loading branch information...
1 parent 61a452a commit dcb856f5b8188dd4dcb53a6c9d41a026ae78b203 @marick committed Mar 19, 2013
Showing with 10 additions and 1 deletion.
  1. +10 −1 test/as_documentation/prerequisites__the_basics.clj
@@ -226,14 +226,23 @@
(find-letter) => anything
(provided
(letter & anything) => anything))
-
+
+(let [desired-letter "x"]
+ (fact "lexical bindings are obeyed"
+ (find-letter) => ..letter-result..
+ (provided
+ (letter desired-letter & anything) => ..letter-result..)))
+
+
+
(future-fact "You can even apply a checker to the &rest argument"
(find-letter) => ..letter-result..
(provided
(letter & (as-checker (fn [actual] (prn actual) true))) => ..letter-result..))
+

0 comments on commit dcb856f

Please sign in to comment.