-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from nebula-plugins/68/dependency-lock-plugin-…
…can-be-disabled NebulaResponsiblePlugin: Add flag to disable nebula dependency lock plugin.
- Loading branch information
Showing
2 changed files
with
38 additions
and
2 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
32 changes: 32 additions & 0 deletions
32
src/test/groovy/nebula/plugin/responsible/NebulaResponsiblePluginLauncherSpec.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,32 @@ | ||
package nebula.plugin.responsible | ||
|
||
import nebula.test.IntegrationTestKitSpec | ||
import org.gradle.testkit.runner.TaskOutcome | ||
|
||
class NebulaResponsiblePluginLauncherSpec extends IntegrationTestKitSpec { | ||
|
||
def setup() { | ||
buildFile << """ | ||
plugins { | ||
id 'java' | ||
id 'nebula.project' | ||
} | ||
""" | ||
} | ||
|
||
def 'should apply nebula dependency lock plugin by default'() { | ||
when: | ||
def result = runTasks('generateLock') | ||
|
||
then: | ||
result.task(':generateLock').outcome == TaskOutcome.SUCCESS | ||
} | ||
|
||
def 'should allow to disable nebula dependency lock via project property'() { | ||
when: | ||
def result = runTasksAndFail('generateLock', '-Pnebula.dependencyLockPluginEnabled=false') | ||
|
||
then: | ||
result.output.contains('Task \'generateLock\' not found in root project') | ||
} | ||
} |