You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/scaffold-package-readme.feature
+38-16Lines changed: 38 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,17 @@ Feature: Scaffold a README.md file for an existing package
94
94
Scenario: Scaffold a README.md requiring a nightly build
95
95
Given an empty directory
96
96
97
-
When I run `wp scaffold package wp-cli/foo --dir=foo --require_wp_cli='>=0.24.0-alpha'`
97
+
And a foo/composer.json file:
98
+
"""
99
+
{
100
+
"name": "wp-cli/foo",
101
+
"require": {
102
+
"wp-cli/wp-cli": ">=0.24.0-alpha"
103
+
}
104
+
}
105
+
"""
106
+
107
+
When I run `wp scaffold package-readme foo`
98
108
Then STDOUT should contain:
99
109
"""
100
110
Success: Created package readme.
@@ -103,23 +113,27 @@ Feature: Scaffold a README.md file for an existing package
103
113
"""
104
114
"require": {
105
115
"wp-cli/wp-cli": ">=0.24.0-alpha"
106
-
},
116
+
}
107
117
"""
108
118
And the foo/README.md file should exist
109
119
And the foo/README.md file should contain:
110
120
"""
111
121
Installing this package requires WP-CLI v0.24.0-alpha or greater. Update to the latest nightly release with `wp cli update --nightly`.
112
122
"""
113
-
When I run `wp package uninstall wp-cli/foo`
114
-
Then STDOUT should contain:
115
-
"""
116
-
Success: Uninstalled package.
117
-
"""
118
-
119
123
Scenario: Scaffold a README.md requiring the latest stable release
120
124
Given an empty directory
121
125
122
-
When I run `wp scaffold package wp-cli/foo --dir=foo --require_wp_cli='*'`
126
+
And a foo/composer.json file:
127
+
"""
128
+
{
129
+
"name": "wp-cli/foo",
130
+
"require": {
131
+
"wp-cli/wp-cli": "*"
132
+
}
133
+
}
134
+
"""
135
+
136
+
When I run `wp scaffold package-readme foo`
123
137
Then STDOUT should contain:
124
138
"""
125
139
Success: Created package readme.
@@ -128,19 +142,13 @@ Feature: Scaffold a README.md file for an existing package
128
142
"""
129
143
"require": {
130
144
"wp-cli/wp-cli": "*"
131
-
},
145
+
}
132
146
"""
133
147
And the foo/README.md file should exist
134
148
And the foo/README.md file should contain:
135
149
"""
136
150
Installing this package requires WP-CLI's latest stable release. Update to the latest stable release with `wp cli update`.
137
151
"""
138
-
When I run `wp package uninstall wp-cli/foo`
139
-
Then STDOUT should contain:
140
-
"""
141
-
Success: Uninstalled package.
142
-
"""
143
-
144
152
Scenario: Scaffold a readme with custom shields
145
153
Given an empty directory
146
154
And a foo/composer.json file:
@@ -182,6 +190,13 @@ Feature: Scaffold a README.md file for an existing package
182
190
183
191
Scenario: Scaffold a readme with a remote support body
184
192
Given an empty directory
193
+
And that HTTP requests to https://gist.githubusercontent.com/danielbachhuber/bb652b1b744cea541705ee9c13605dad/raw/195c17ebb8cf25e947a9df6e02de1e96a084c287/support.md will respond with:
194
+
"""
195
+
HTTP/1.1 200 OK
196
+
Content-Type: text/plain
197
+
198
+
Support isn't free!
199
+
"""
185
200
And a foo/composer.json file:
186
201
"""
187
202
{
@@ -209,6 +224,13 @@ Feature: Scaffold a README.md file for an existing package
209
224
210
225
Scenario: Scaffold a readme with a pre, post and body for the section
211
226
Given an empty directory
227
+
And that HTTP requests to https://gist.githubusercontent.com/danielbachhuber/bb652b1b744cea541705ee9c13605dad/raw/195c17ebb8cf25e947a9df6e02de1e96a084c287/support.md will respond with:
0 commit comments