diff --git a/src/integTest/groovy/com/moowork/gradle/node/YarnInstall_integTest.groovy b/src/test/groovy/com/moowork/gradle/node/itest/YarnInstall_integTest.groovy similarity index 68% rename from src/integTest/groovy/com/moowork/gradle/node/YarnInstall_integTest.groovy rename to src/test/groovy/com/moowork/gradle/node/itest/YarnInstall_integTest.groovy index 7e1beed..07559b7 100644 --- a/src/integTest/groovy/com/moowork/gradle/node/YarnInstall_integTest.groovy +++ b/src/test/groovy/com/moowork/gradle/node/itest/YarnInstall_integTest.groovy @@ -1,6 +1,6 @@ -package com.moowork.gradle.node +package com.moowork.gradle.node.itest -import com.moowork.gradle.AbstractIntegTest +import org.gradle.testkit.runner.TaskOutcome class YarnInstall_integTest extends AbstractIntegTest @@ -9,7 +9,9 @@ class YarnInstall_integTest { given: writeBuild( ''' - apply plugin: 'com.moowork.node' + plugins { + id 'com.moowork.node' + } node { version = "6.9.1" @@ -22,23 +24,25 @@ class YarnInstall_integTest writeEmptyPackageJson() when: - def result = runTasksSuccessfully( 'yarn' ) + def result = buildTask( 'yarn' ) then: - result.wasExecuted( 'yarn' ) + result.outcome == TaskOutcome.SUCCESS when: - result = runTasksSuccessfully( 'yarn' ) + result = buildTask( 'yarn' ) then: - result.wasUpToDate( 'yarn' ) + result.outcome == TaskOutcome.UP_TO_DATE } def 'install packages with yarn in different directory'() { given: writeBuild( ''' - apply plugin: 'com.moowork.node' + plugins { + id 'com.moowork.node' + } node { version = "6.9.1" @@ -56,9 +60,9 @@ class YarnInstall_integTest }""" ) when: - def result = runTasksSuccessfully( 'yarn' ) + def result = buildTask( 'yarn' ) then: - result.wasExecuted( 'yarn' ) + result.outcome == TaskOutcome.SUCCESS } } diff --git a/src/integTest/groovy/com/moowork/gradle/node/YarnRule_integTest.groovy b/src/test/groovy/com/moowork/gradle/node/itest/YarnRule_integTest.groovy similarity index 69% rename from src/integTest/groovy/com/moowork/gradle/node/YarnRule_integTest.groovy rename to src/test/groovy/com/moowork/gradle/node/itest/YarnRule_integTest.groovy index 91146ec..c1d6252 100644 --- a/src/integTest/groovy/com/moowork/gradle/node/YarnRule_integTest.groovy +++ b/src/test/groovy/com/moowork/gradle/node/itest/YarnRule_integTest.groovy @@ -1,6 +1,6 @@ -package com.moowork.gradle.node +package com.moowork.gradle.node.itest -import com.moowork.gradle.AbstractIntegTest +import org.gradle.testkit.runner.TaskOutcome class YarnRule_integTest extends AbstractIntegTest @@ -9,7 +9,9 @@ class YarnRule_integTest { given: writeBuild( ''' - apply plugin: 'com.moowork.node' + plugins { + id 'com.moowork.node' + } node { version = "6.9.1" @@ -22,17 +24,19 @@ class YarnRule_integTest writeEmptyPackageJson() when: - def result = runTasksSuccessfully( 'yarn_install' ) + def result = buildTask( 'yarn_install' ) then: - result.wasExecuted( 'yarn_install' ) + result.outcome == TaskOutcome.SUCCESS } def 'can execute an yarn module using yarn_run_'() { given: writeBuild( ''' - apply plugin: 'com.moowork.node' + plugins { + id 'com.moowork.node' + } node { version = "6.9.1" @@ -44,10 +48,10 @@ class YarnRule_integTest copyResources( 'fixtures/yarn/package.json', 'package.json' ) when: - def result = runTasksSuccessfully( 'yarn_run_parent' ) + def result = buildTask( 'yarn_run_parent' ) then: - result.success + result.outcome == TaskOutcome.SUCCESS fileExists( 'child1.txt' ) fileExists( 'child2.txt' ) fileExists( 'parent1.txt' ) diff --git a/src/integTest/resources/fixtures/yarn/package.json b/src/test/resources/fixtures/yarn/package.json similarity index 100% rename from src/integTest/resources/fixtures/yarn/package.json rename to src/test/resources/fixtures/yarn/package.json