Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Profiles - fix list-profiles command
- Loading branch information
1 parent
77dd98f
commit 3eb08a9
Showing
5 changed files
with
68 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
grails-shell/src/test/groovy/org/grails/cli/profile/repository/MavenRepositorySpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.grails.cli.profile.repository | ||
|
||
import spock.lang.Specification | ||
|
||
|
||
|
||
/** | ||
* @author graemerocher | ||
*/ | ||
class MavenRepositorySpec extends Specification { | ||
|
||
|
||
void "Test resolve profile"() { | ||
given:"A maven profile repository" | ||
def repo = new MavenProfileRepository() | ||
|
||
when:"We resolve the web profile" | ||
def profile = repo.getProfile("web") | ||
|
||
then:"The profile is not null" | ||
profile != null | ||
profile.name == 'web' | ||
} | ||
|
||
void "Test list all profiles"() { | ||
given:"A maven profile repository" | ||
def repo = new MavenProfileRepository() | ||
|
||
when:"We resolve the web profile" | ||
def profiles = repo.allProfiles | ||
|
||
then:"The profiles are not null or empty" | ||
profiles | ||
} | ||
} |