Skip to content

Commit 79b8485

Browse files
committed
Fix tests
1 parent afd4153 commit 79b8485

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

grails-shell/src/test/groovy/org/grails/cli/profile/commands/CreateAppCommandSpec.groovy

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
package org.grails.cli.profile.commands
22

33
import grails.build.logging.GrailsConsole
4-
import org.grails.build.parsing.CommandLine
5-
import org.grails.build.parsing.DefaultCommandLine
64
import org.grails.cli.profile.Feature
75
import org.grails.cli.profile.Profile
86
import org.spockframework.util.StringMessagePrintStream
97
import spock.lang.Shared
108
import spock.lang.Specification
11-
129
/**
1310
* Created by Jim on 7/18/2016.
1411
*/
@@ -39,10 +36,9 @@ class CreateAppCommandSpec extends Specification {
3936
2 * getFeatures() >> [bar]
4037
1 * getRequiredFeatures() >> []
4138
}
42-
CommandLine commandLine = new DefaultCommandLine().parseNew(["create-app", "foo", "-features=foo,bar"] as String[])
4339

4440
when:
45-
Iterable<Feature> features = new CreateAppCommand().evaluateFeatures(profile, commandLine)
41+
Iterable<Feature> features = new CreateAppCommand().evaluateFeatures(profile, ['foo', 'bar'])
4642

4743
then:
4844
features.size() == 1
@@ -63,10 +59,9 @@ class CreateAppCommandSpec extends Specification {
6359
2 * getFeatures() >> [foo, bar]
6460
1 * getRequiredFeatures() >> []
6561
}
66-
CommandLine commandLine = new DefaultCommandLine().parseNew(["create-app", "foo", "-features=foo,bar"] as String[])
6762

6863
when:
69-
Iterable<Feature> features = new CreateAppCommand().evaluateFeatures(profile, commandLine)
64+
Iterable<Feature> features = new CreateAppCommand().evaluateFeatures(profile, ['foo', 'bar'])
7065

7166
then:
7267
features.size() == 2
@@ -85,11 +80,9 @@ class CreateAppCommandSpec extends Specification {
8580
2 * getFeatures() >> [bar]
8681
1 * getRequiredFeatures() >> []
8782
}
88-
CommandLine commandLine = new DefaultCommandLine().parseNew(["create-app", "foo", "-features=mongo"] as String[])
8983

9084
when:
91-
Iterable<Feature> features = new CreateAppCommand().evaluateFeatures(profile, commandLine)
92-
85+
Iterable<Feature> features = new CreateAppCommand().evaluateFeatures(profile, ['mongo'])
9386

9487
then:
9588
features.size() == 0

0 commit comments

Comments
 (0)