Created
July 18, 2013 22:19
-
-
Save dhemery/6033628 to your computer and use it in GitHub Desktop.
Suddenly my tests became Gherkin. I like it for these two tests. Will I like it for more?
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
@Test | |
public void copiesPlainFilesFromSourceRootToSiteRoot() { | |
given(sourceFile("foo.txt"), withContent("foo content")); | |
when(jogger, runs()); | |
then(siteFile("foo.txt"), content(), is("foo content")); | |
} | |
@Test | |
public void copiesPlainFilesFromSourceSubdirectoryToCorrespondingSiteSubdirectory() { | |
given(sourceFile("my/subdirectory/foo.txt"), withContent("subdirectory foo content")); | |
when(jogger, runs()); | |
then(siteFile("my/subdirectory/foo.txt"), content(), is("subdirectory foo content")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment