diff options
author | Daniel Firth <dan.firth@codethink.co.uk> | 2013-10-31 14:28:12 +0000 |
---|---|---|
committer | Daniel Firth <dan.firth@codethink.co.uk> | 2013-11-01 15:27:10 +0000 |
commit | 6a1d074bfd30d5d24faf02725542ec87509c310a (patch) | |
tree | 5a4e9458fcfd5f57e749e807161d8f6c1a704119 /yarns | |
parent | 2d16996377f369c97d35b7b48bdd336c2e8f5a08 (diff) | |
download | morph-6a1d074bfd30d5d24faf02725542ec87509c310a.tar.gz |
Added scenario test to prevent morph edit from being used without a system argument
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/branches-workspaces.yarn | 10 | ||||
-rw-r--r-- | yarns/implementations.yarn | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn index b90c054c..fd2154e7 100644 --- a/yarns/branches-workspaces.yarn +++ b/yarns/branches-workspaces.yarn @@ -204,6 +204,16 @@ purposes. AND in branch foo, stratum test-stratum refs test-chunk in foo AND edited chunk test:test-chunk has git branch foo +Morph edit should only work with a system argument. + + SCENARIO morph edit errors when supplied only a stratum and chunk as arguments + GIVEN a workspace + AND a git server + WHEN checking out the master system branch + AND editing chunk test-chunk in stratum test-stratum with no system specified in branch master + THEN morph failed + AND the edit error message includes the string "is not a system" + Status of system branch checkout -------------------------------- diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index 85149f0a..1350662d 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -281,6 +281,10 @@ Editing morphologies with `morph edit`. echo "$MATCH_2" > "$DATADIR/git-branch.wanted" diff -u "$DATADIR/git-branch.wanted" "$DATADIR/git-branch.actual" + IMPLEMENTS WHEN editing chunk (\S+) in stratum (\S+) with no system specified in branch (\S+) + cd "$DATADIR/workspace/$MATCH_3" + attempt_morph edit "$MATCH_2" "$MATCH_1" + IMPLEMENTS WHEN creating an uncommitted system morphology called (\S+) for architecture (\S+) in system branch (\S+) cat << EOF > "$DATADIR/workspace/$MATCH_3/test:morphs/$MATCH_1.morph" arch: $MATCH_2 @@ -477,7 +481,7 @@ Implementation sections for deployment Implementations sections for reading error messages =================================================== - IMPLEMENTS THEN the (init|build|checkout|branch|deploy) error message includes the string "(.*)" + IMPLEMENTS THEN the (branch|build|checkout|deploy|edit|init) error message includes the string "(.*)" grep "$MATCH_2" "$DATADIR/result-$MATCH_1" IMPLEMENTS for test file and directory handling |