@@ -43,48 +43,50 @@ function repo-with-remotes() {
43
43
}
44
44
45
45
title " Porcelain ${kind} "
46
- (when " running 'organize'"
47
- snapshot=" $snapshot /organize"
48
- (with " a mix of repositories"
49
- (sandbox
50
- repo-with-remotes dir/one-origin origin https://example.com/one-origin
51
- repo-with-remotes origin-and-fork origin https://example.com/origin-and-fork fork https://example.com/other/origin-and-fork
52
- repo-with-remotes special-origin special-name https://example.com/special-origin
53
- repo-with-remotes no-origin
54
- (when " running without arguments"
55
- it " succeeds and informs about the operations that it WOULD do" && {
56
- WITH_SNAPSHOT=" $snapshot /no-args-success" \
57
- expect_run_sh $SUCCESSFULLY " $exe organize 2>/dev/null"
58
- }
46
+ (with_program tree
47
+ (when " running 'organize'"
48
+ snapshot=" $snapshot /organize"
49
+ (with " a mix of repositories"
50
+ (sandbox
51
+ repo-with-remotes dir/one-origin origin https://example.com/one-origin
52
+ repo-with-remotes origin-and-fork origin https://example.com/origin-and-fork fork https://example.com/other/origin-and-fork
53
+ repo-with-remotes special-origin special-name https://example.com/special-origin
54
+ repo-with-remotes no-origin
55
+ (when " running without arguments"
56
+ it " succeeds and informs about the operations that it WOULD do" && {
57
+ WITH_SNAPSHOT=" $snapshot /no-args-success" \
58
+ expect_run_sh $SUCCESSFULLY " $exe organize 2>/dev/null"
59
+ }
59
60
60
- it " does not change the directory structure at all" && {
61
- WITH_SNAPSHOT=" $snapshot /initial-directory-structure" \
62
- expect_run $SUCCESSFULLY tree -L 2
63
- }
64
- )
61
+ it " does not change the directory structure at all" && {
62
+ WITH_SNAPSHOT=" $snapshot /initial-directory-structure" \
63
+ expect_run $SUCCESSFULLY tree -L 2
64
+ }
65
+ )
65
66
66
- (when " running with --execute"
67
- it " succeeds" && {
68
- WITH_SNAPSHOT=" $snapshot /execute-success" \
69
- expect_run_sh $SUCCESSFULLY " $exe organize --execute 2>/dev/null"
70
- }
67
+ (when " running with --execute"
68
+ it " succeeds" && {
69
+ WITH_SNAPSHOT=" $snapshot /execute-success" \
70
+ expect_run_sh $SUCCESSFULLY " $exe organize --execute 2>/dev/null"
71
+ }
71
72
72
- it " changes the directory structure" && {
73
- WITH_SNAPSHOT=" $snapshot /directory-structure-after-organize" \
74
- expect_run $SUCCESSFULLY tree -L 2
75
- }
76
- )
73
+ it " changes the directory structure" && {
74
+ WITH_SNAPSHOT=" $snapshot /directory-structure-after-organize" \
75
+ expect_run $SUCCESSFULLY tree -L 2
76
+ }
77
+ )
77
78
78
- (when " running with --execute again"
79
- it " succeeds" && {
80
- WITH_SNAPSHOT=" $snapshot /execute-success" \
81
- expect_run_sh $SUCCESSFULLY " $exe organize --execute 2>/dev/null"
82
- }
79
+ (when " running with --execute again"
80
+ it " succeeds" && {
81
+ WITH_SNAPSHOT=" $snapshot /execute-success" \
82
+ expect_run_sh $SUCCESSFULLY " $exe organize --execute 2>/dev/null"
83
+ }
83
84
84
- it " does not alter the directory structure as these are already in place" && {
85
- WITH_SNAPSHOT=" $snapshot /directory-structure-after-organize" \
86
- expect_run $SUCCESSFULLY tree -L 2
87
- }
85
+ it " does not alter the directory structure as these are already in place" && {
86
+ WITH_SNAPSHOT=" $snapshot /directory-structure-after-organize" \
87
+ expect_run $SUCCESSFULLY tree -L 2
88
+ }
89
+ )
88
90
)
89
91
)
90
92
)
0 commit comments