Sha256: 562c646c99bcd4ae06d2fa923eedfac5ff0c5d10b7c1999f139d4b0b60289fa1

Contents?: true

Size: 580 Bytes

Versions: 4

Compression:

Stored size: 580 Bytes

Contents

(validate/def string test-0 (if (< (len string)  6) (mf "length" "should be more than 6")))
(validate/def string test-0 (if (> (len string) 10) (mf "length" "should be less than 10")))

(examples-for validate
  ("returns a message about a string being too short"
   (to-string:validate "foo" 'test-0)
   "{\"length\"=>(\"should be more than 6\")}")

("returns a message about a string being too long"
   (to-string:validate "foo bar toto titi" 'test-0)
   "{\"length\"=>(\"should be less than 10\")}")

("returns an empty hash"
   (to-string:validate "foo bar" 'test-0)
   "{}"))

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nydp-0.6.0 lib/lisp/tests/validation-examples.nydp
nydp-0.5.1 lib/lisp/tests/validation-examples.nydp
nydp-0.5.0 lib/lisp/tests/validation-examples.nydp
nydp-0.4.6 lib/lisp/tests/validation-examples.nydp