Created
February 20, 2012 17:14
-
-
Save CampingScorpion/1870159 to your computer and use it in GitHub Desktop.
Formula example syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Example of midje formula | |
| (defn make-string | |
| "A generator for 'random' string values - could use the ones from test.generative" | |
| [] | |
| (rand-nth ["a" "b" "c" "d" "e" "f" "g" "i"])) | |
| (formula | |
| "can now use simple generative-style formulas" | |
| [a (make-string) b (make-string)] | |
| (str a b) => (has-prefix a)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment