diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-08 13:27:51 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-08 13:37:45 +0000 |
commit | 7819677343bb40e899fa2cd252c203013911fede (patch) | |
tree | 85c845640e5a2777602f02c2b9fc8d22e8715e30 /yarns | |
parent | 6cfc967b82b371f655151f9081cfde81c1f4f150 (diff) | |
download | morph-7819677343bb40e899fa2cd252c203013911fede.tar.gz |
yarns: add a scenario for checking out a chunk
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/branches-workspaces.yarn | 18 | ||||
-rw-r--r-- | yarns/implementations.yarn | 12 |
2 files changed, 30 insertions, 0 deletions
diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn index bfcb9e66..3af362a1 100644 --- a/yarns/branches-workspaces.yarn +++ b/yarns/branches-workspaces.yarn @@ -58,6 +58,15 @@ Checking out a system branch should fail, if the branch doesn't exist. WHEN morph attempts to check out system branch foo THEN morph failed +Checking out a system branch should also fail if the repository does +not contain any system morphologies. + + SCENARIO checking out a system branch with no systems + GIVEN a workspace + AND a git server + WHEN morph attempts to check out a repository with no systems + THEN morph failed + We can, instead, create a new system branch, off master. SCENARIO branch off master @@ -78,6 +87,15 @@ to check for that locally. AND creating system branch bar, based on foo THEN the system branch bar is checked out +Similarly, attempting to branch a system branch should fail if the +repository does not contain any system morphologies. + + SCENARIO checking out a system branch with no systems + GIVEN a workspace + AND a git server + WHEN morph attempts to branch a repository with no systems + THEN morph failed + Query commands in workspaces ---------------------------- diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index dc5f1f54..7f9281ac 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -126,6 +126,12 @@ Attempt to check out a system branch, and remember if it failed. cd "$DATADIR/workspace" attempt_morph checkout test:morphs "$MATCH_1" +Attempt to check out a system branch from a root that has no systems. + + IMPLEMENTS WHEN morph attempts to check out a repository with no systems + cd "$DATADIR/workspace" + attempt_morph checkout test:test-chunk master + We also need to verify that a system branch has been checked out. IMPLEMENTS THEN the system branch (\S+) is checked out @@ -145,6 +151,12 @@ We can create a new branch, off another system branch. cd "$DATADIR/workspace" run_morph branch test:morphs "$MATCH_1" "$MATCH_2" +Attempt to branch a system branch from a root that had no systems. + + IMPLEMENTS WHEN morph attempts to branch a repository with no systems + cd "$DATADIR/workspace" + attempt_morph branch test:test-chunk foo + Pushing all changes in a system branch checkout to the git server. IMPLEMENTS WHEN pushing system branch (\S+) to git server |