From 8504f029bd2dffd1550b16c50d293aa58290d333 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 30 Oct 2013 10:45:39 +0000 Subject: Add regression test, morph branch doesn't remove existing branch dir --- yarns/regression.yarn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 -- cgit v1.2.1