Last active
December 18, 2015 07:29
-
-
Save xconnecting/5746530 to your computer and use it in GitHub Desktop.
[Groovy] cucumber-jvm-groovy sample (step definition)
This file contains 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
this.metaClass.mixin(cucumber.runtime.groovy.Hooks) | |
this.metaClass.mixin(cucumber.runtime.groovy.EN) | |
Given(~'^I have a hello app with "([^"]*)"$') { String arg1 -> | |
hello = new Hello(arg1) | |
} | |
When(~'^I ask it to say hi$') { -> | |
hi = hello.sayHi(); | |
} | |
Then(~'^it should answer with "([^"]*)"$') { String arg1 -> | |
assert arg1 == hi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment