Created
November 22, 2010 18:22
-
-
Save vs/710378 to your computer and use it in GitHub Desktop.
Test notation
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
class GsTest { | |
static { | |
File.metaClass.div = { path -> | |
new File(delegate.toString(), path.toString()) | |
} | |
GsSvnUrl.metaClass.div = { path -> | |
delegate.appendPath(path.toString()) | |
} | |
} | |
GsSvnScenario svn = new GsSvnScenario(rootUrl: GsSvnUrl.parseURIEncoded('http://localhost'), rootPath: new File('/tmp/groovy-test/svn')) | |
GsGitScenario git = new GsGitScenario(rootPath: new File('/tmp/groovy-test/git')) | |
@WithExecutableStrings | |
void initialImport() { | |
def init = { File dir -> | |
dir.mkdir() | |
File file = dir / 'file.txt' | |
file << "Some text added into $file" | |
} | |
svn.script = { | |
init svn.trunk.wc | |
"svn import -m 'Initial commit' $svn.trunk.wc $svn.trunk.url" | |
} | |
git.script = { | |
init git.wt | |
"git init" | |
"git add ." | |
"git commit -m 'Initial commit'" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment