-
-
Save rickyclarkson/160597 to your computer and use it in GitHub Desktop.
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
def Given(name: String, body: Either[String => String, (Int, String) => String]) = { | |
body match { | |
case Left(b) => b("bob") | |
case Right(b) => b(5, "belly") | |
} | |
} | |
Given("I have (\\d+) cukes in my (.*)", Right("You have " + _ + " cukes in your " + _)) | |
Given("my name is (.*)", Left("Your name is " + _)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment