Skip to content

Instantly share code, notes, and snippets.

@jurberg
Created March 4, 2014 01:56
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 jurberg/9338807 to your computer and use it in GitHub Desktop.
Save jurberg/9338807 to your computer and use it in GitHub Desktop.
@TestFor(MyController)
@TestMixin(OneTimeDataUnitTestMixin)
class MyControllerSpec extends Specification {
def setup() {
mockOneTimeData(this, controller)
}
def "should fail"() {
given:
params.valid = false
when:
controller.index()
then:
otdData.message == "failed!"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment