elasticsearch/elasticsearch-lang-groovy — pull request #11 by uris77 (2013-07-05 15:21:31+00:00)
Title: Fixed a couple of failing Unit Tests

Copy comment from commit 6e11c03:

When calling buildRoot on a closure, the default resolve strategy
was always being set to the default (OWNER_FIRST). However, for an
array of closures, we need to set that DELEGATE_FIRST. Although this was being
done before calling buildRoot(), inside buildRoot() this was being over-ridden.
To avoid this, the resolve strategy is injected in the param list, and assigned the
default value if no resolve strategy is provided.
Another option would be to always assign the resolve strategy to the colsure before calling
buildRoot(). We don't need to assign the default (OWNER_FIRST) strategy because it will always
defer to that if none is present.