Skip to content

Instantly share code, notes, and snippets.

@vs
Created November 19, 2010 17:27
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 vs/706823 to your computer and use it in GitHub Desktop.
Save vs/706823 to your computer and use it in GitHub Desktop.
Proposed syntax for functional tests
class Scenario {
@Delegate ShellEnvironment env
def svn
def git
GsSvnUrl repo = sandbox.svnRepoRoot
GsSvnUrl trunk = sandbox.trunk;
GsSvnUrl branch = sandbox.getBranch('branch')
@Test
void initialImport() {
def file = new File('file.txt')
svn = {
svn "checkout $trunk ."
file.append "New line added to file $file"
def committedRev = svn("commit -m \"$file modified\"")
println "Committed revision $committedRev"
}
git = {
git "init"
file.append "New line added to file $file"
def commit = git("commit -a -m\"$file modified\"")
println "Created commit $commit"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment