summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2013-10-30 10:45:39 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2013-10-31 15:20:43 +0000
commit8504f029bd2dffd1550b16c50d293aa58290d333 (patch)
tree30810cdc3a37e9012bfe19d8498e764887f876c7
parent10e32aa257db6ac95959661bdc0e7759b822008a (diff)
downloadmorph-8504f029bd2dffd1550b16c50d293aa58290d333.tar.gz
Add regression test, morph branch doesn't remove existing branch dir
-rw-r--r--yarns/regression.yarn20
1 files changed, 20 insertions, 0 deletions
diff --git a/yarns/regression.yarn b/yarns/regression.yarn
index d1cc8e79..7480655d 100644
--- a/yarns/regression.yarn
+++ b/yarns/regression.yarn
@@ -12,3 +12,23 @@ Testing if we can build after checking out from a tag.
WHEN checking out the test-tag system tag
THEN morph build the system simple-system of the tag test-tag of the repo test:morphs
+
+Running `morph branch` when the branch directory exists doesn't
+remove the existing directory.
+
+ SCENARIO re-running 'morph branch' fails, original branch untouched
+ GIVEN a workspace
+ AND a git server
+ WHEN user creates system branch foo
+ THEN the system branch foo is checked out
+
+The branch is checked out correctly, now it should fail if the user executes
+`morph branch` with the same branch name.
+
+ WHEN user attempts to create system branch foo
+ THEN morph failed
+ AND the branch error message includes the string "File exists"
+
+The branch still checked out.
+
+ AND the system branch foo is checked out