Provide way to use CLosure to assert tags values

This commit is contained in:
Nikolay Martynov 2018-06-06 16:40:34 -04:00
parent b1bc24dd67
commit 30d640e7ee
1 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,8 @@ class TagsAssert {
def arg = args[0]
if (arg instanceof Class) {
assert ((Class) arg).isInstance(tags[name])
} else if (arg instanceof Closure) {
assert ((Closure) arg).call(tags[name])
} else {
assert tags[name] == arg
}