Created
June 11, 2014 15:07
-
-
Save ddelponte/7b971f2c0afdf4e18306 to your computer and use it in GitHub Desktop.
Unit testing tricks - groovyPages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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