Skip to content

Instantly share code, notes, and snippets.

@ddelponte
Created June 11, 2014 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddelponte/7b971f2c0afdf4e18306 to your computer and use it in GitHub Desktop.
Save ddelponte/7b971f2c0afdf4e18306 to your computer and use it in GitHub Desktop.
Unit testing tricks - groovyPages
// Templates rendered by TagLib may be verified as follows
class SomeAwesomeSpec extends Specification {
public static final String BLAH = "BLAH"
void "test something"() {
given:
groovyPages.put("/path/to/_blah.gsp", BLAH)
when:
def results = tagLib.tagName([my: map])
then:
results == BLAH
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment