summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2013-10-31 14:50:41 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2013-10-31 15:19:55 +0000
commit10e32aa257db6ac95959661bdc0e7759b822008a (patch)
treef91db3d2e39c4e6e21f44c630dbc505d99268bec
parent460227f17e01f9072b72062fae84f226133ec04c (diff)
downloadmorph-10e32aa257db6ac95959661bdc0e7759b822008a.tar.gz
Some tests refactorized for better understanding.
-rw-r--r--yarns/branches-workspaces.yarn22
-rw-r--r--yarns/implementations.yarn6
2 files changed, 16 insertions, 12 deletions
diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn
index cd3f7a0e..b90c054c 100644
--- a/yarns/branches-workspaces.yarn
+++ b/yarns/branches-workspaces.yarn
@@ -72,7 +72,7 @@ We can, instead, create a new system branch, off master.
SCENARIO branch off master
GIVEN a workspace
AND a git server
- WHEN creating system branch foo
+ WHEN user creates system branch foo
THEN the system branch foo is checked out
We can also branch off another system branch. However, we need to first
@@ -82,7 +82,7 @@ to check for that locally.
SCENARIO branch off non-master
GIVEN a workspace
AND a git server
- WHEN creating system branch foo
+ WHEN user creates system branch foo
AND pushing system branch foo to git server
AND creating system branch bar, based on foo
THEN the system branch bar is checked out
@@ -147,7 +147,7 @@ current directory, things should fail.
GIVEN a workspace
AND a git server
WHEN checking out the master system branch
- AND creating system branch foo
+ AND user creates system branch foo
AND attempting to report system branch in .
THEN morph failed
@@ -186,7 +186,7 @@ all the refs are unchanged.
SCENARIO morph branch does not edit refs
GIVEN a workspace
AND a git server
- WHEN creating system branch foo
+ WHEN user creates system branch foo
THEN in branch foo, system test-system refs test-stratum in master
AND in branch foo, stratum test-stratum refs test-chunk in master
@@ -214,7 +214,7 @@ repositories referenced in the system branch.
SCENARIO morph status reports changes correctly
GIVEN a workspace
AND a git server
- WHEN creating system branch foo
+ WHEN user creates system branch foo
THEN morph reports no outstanding changes in foo
WHEN editing stratum test-stratum in system test-system in branch foo
@@ -244,7 +244,7 @@ branch checkout.
SCENARIO morph foreach runs command in each git repo
GIVEN a workspace
AND a git server
- WHEN creating system branch foo
+ WHEN user creates system branch foo
AND editing chunk test-chunk in test-stratum in test-system in branch foo
AND running shell command in each repo in foo
THEN morph ran command in test:morphs in foo
@@ -261,7 +261,7 @@ unpetrify and verify that we have all the same refs as before.
SCENARIO morph petrifies and unpetrifies
GIVEN a workspace
AND a git server
- WHEN creating system branch foo
+ WHEN user creates system branch foo
AND pushing system branch foo to git server
AND remembering all refs in foo
AND petrifying foo
@@ -279,7 +279,7 @@ system branch itself, only the tag.
SCENARIO morph tags a system branch
GIVEN a workspace
AND a git server
- WHEN creating system branch foo
+ WHEN user creates system branch foo
AND tagging system branch foo as test123
THEN morph tag test123 in foo is an annotated git tag
AND morph tag test123 in foo refers to a petrified commit
@@ -314,7 +314,7 @@ wouldn't need to worry about changing the system branch ref.
GIVEN a workspace
AND a git server
AND null refs for local strata
- WHEN creating system branch foo
+ WHEN user creates system branch foo
THEN the system branch foo is checked out
When we edit a morphology with null refs, they stay null.
@@ -326,7 +326,7 @@ When we edit a morphology with null refs, they stay null.
When creating the branch, the refs remain null.
- WHEN creating system branch foo
+ WHEN user creates system branch foo
THEN in branch foo, system test-system refs test-stratum in None
After editing the stratum they remain null.
@@ -347,7 +347,7 @@ Petrifying also leaves null refs unmolested
GIVEN a workspace
AND a git server
AND null refs for local strata
- WHEN creating system branch foo
+ WHEN user creates system branch foo
AND pushing system branch foo to git server
AND remembering all refs in foo
AND petrifying foo
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index 22120130..985ab2bc 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -183,10 +183,14 @@ We also need to verify that a system branch has been checked out.
We can create a new branch, off master.
- IMPLEMENTS WHEN creating system branch (\S+)
+ IMPLEMENTS WHEN user creates system branch (\S+)
cd "$DATADIR/workspace"
run_morph branch test:morphs "$MATCH_1"
+ IMPLEMENTS WHEN user attempts to create system branch (\S+)
+ cd "$DATADIR/workspace"
+ attempt_morph branch test:morphs "$MATCH_1"
+
We can create a new branch, off another system branch.
IMPLEMENTS WHEN creating system branch (\S+), based on (\S+)