@@ -231,20 +231,19 @@ project:
231231 });
232232 });
233233
234- group ('and inside a dart directory when calling create' , () {
234+ group ('and inside a dart (but not Serverpod) directory when calling create' ,
235+ () {
235236 late Future commandResult;
236- late String dartDir;
237237
238238 setUp (() async {
239239 await d.dir ('dart_dir' , [
240- ProjectFactory .serverpodServerPubspec (),
241240 d.file ('pubspec.yaml' , '''
242241name: my_own_server
243242dependencies:
244243 test: 1.0
245244''' ),
246245 ]).create ();
247- dartDir = p.absolute (d.sandbox, 'dart_dir' );
246+ final dartDir = p.absolute (d.sandbox, 'dart_dir' );
248247 pushCurrentDirectory (dartDir);
249248
250249 commandResult = cli.run ([
@@ -275,20 +274,19 @@ dependencies:
275274 test ('then does not write scloud.yaml file' , () async {
276275 await commandResult;
277276
278- final expected = d.dir (dartDir , [
277+ final expected = d.dir ('dart_dir' , [
279278 d.nothing ('scloud.yaml' ),
280279 ]);
281280 await expectLater (expected.validate (), completes);
282281 });
283282 });
284283
285- group ('and in a non-serverpod directory when calling create' , () {
284+ group ('and in a non-dart directory when calling create' , () {
286285 late Future commandResult;
287- late String otherDir;
288286
289287 setUp (() async {
290288 await d.dir ('other_dir' ).create ();
291- otherDir = p.absolute (d.sandbox, 'other_dir' );
289+ final otherDir = p.absolute (d.sandbox, 'other_dir' );
292290 pushCurrentDirectory (otherDir);
293291
294292 commandResult = cli.run ([
@@ -319,7 +317,7 @@ dependencies:
319317 test ('then does not write scloud.yaml file' , () async {
320318 await commandResult;
321319
322- final expected = d.dir (otherDir , [
320+ final expected = d.dir ('other_dir' , [
323321 d.nothing ('scloud.yaml' ),
324322 ]);
325323 await expectLater (expected.validate (), completes);
@@ -396,7 +394,7 @@ dependencies:
396394 ]),
397395 ]),
398396 ]);
399- await expectLater (expected.validate (d.sandbox ), completes);
397+ await expectLater (expected.validate (), completes);
400398 });
401399
402400 test (
0 commit comments