--- /dev/null
+set -e
+
+foo_setup() {
+
+ repo_dir="`mktemp -d`"
+ repo="$repo_dir/repo"
+ git init "$repo"
+ (
+ cd "$repo"
+ echo Contents > test-file
+ git add test-file
+ git commit -m 'Commit message'
+ )
+
+ conf="`mktemp`"
+ cat > "$conf" <<EOF
+[foo]
+git_repo = file://$repo
+git_ref = master
+EOF
+
+}
+
+foo_cleanup() {
+ rm -rf "$repo_dir" "$conf"
+}