Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

split example into defs

  • Loading branch information...
commit 53e8c6eb60c0ea223d6ee424504c82d67b113029 1 parent d9ac9bf
Logan Campbell authored
Showing with 14 additions and 2 deletions.
  1. +7 −1 README.md
  2. +7 −1 test/vlad/test/readme.clj
8 README.md
View
@@ -22,7 +22,13 @@ API Docs: <http://logaan.github.io/vlad/vlad.html>
(:require [vlad :refer :all]
[midje.sweet :refer [fact]]))
-(fact (validate (present [:age]) {:name "Logan"})
+(def validation
+ (present [:age]))
+
+(def data
+ {:name "Logan Campbell"})
+
+(fact (validate validation data)
=> [{:type :vlad.validations/present
:selector [:age]}])
```
8 test/vlad/test/readme.clj
View
@@ -3,7 +3,13 @@
[midje.sweet :refer [fact]]))
; Basics
-(fact (validate (present [:age]) {:name "Logan Campbell"})
+(def validation
+ (present [:age]))
+
+(def data
+ {:name "Logan Campbell"})
+
+(fact (validate validation data)
=> [{:type :vlad.validations/present
:selector [:age]}])
Please sign in to comment.
Something went wrong with that request. Please try again.