From 7819677343bb40e899fa2cd252c203013911fede Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Thu, 8 Aug 2013 13:27:51 +0000 Subject: yarns: add a scenario for checking out a chunk --- yarns/branches-workspaces.yarn | 18 ++++++++++++++++++ yarns/implementations.yarn | 12 ++++++++++++ 2 files changed, 30 insertions(+) (limited to 'yarns') 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 -- cgit v1.2.1