Shuffle some tests around so they don't run in the integrationTest task

This commit is contained in:
R. Tyler Croy 2015-08-14 11:47:26 -07:00
parent fe5a55d754
commit 4d340fc42c
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
4 changed files with 45 additions and 46 deletions

View File

@ -40,8 +40,8 @@ task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
testLogging {
showStandardStreams = true
exceptionFormat "full"
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
check.dependsOn integrationTest

View File

@ -10,51 +10,6 @@ import org.junit.Rule
import org.junit.rules.TemporaryFolder
import spock.lang.*
/**
*/
class JRubyStormTaskIntegrationSpec extends Specification {
def "evaluation of the project should result in an assemble and run task"() {
given:
Project project = ProjectBuilder.builder().build()
project.apply plugin: 'com.github.jruby-gradle.storm'
when:
project.evaluate()
then:
project.tasks.findByName('assembleJRubyStorm')
project.tasks.findByName('runJRubyStorm')
}
def "evaluation of the project should result in dependencies being added to the configuration"() {
given:
Project project = ProjectBuilder.builder().build()
project.apply plugin: 'com.github.jruby-gradle.storm'
JRubyStorm task = project.task('spock', type: JRubyStorm)
def deps = task.configuration.dependencies
when:
project.evaluate()
then:
deps.matching { Dependency d -> d.name == 'redstorm' }
}
def "evaluation of the project should result in local mode dependencies"() {
given:
Project project = ProjectBuilder.builder().build()
project.apply plugin: 'com.github.jruby-gradle.storm'
JRubyStorm task = project.task('spock', type: JRubyStorm)
when:
project.evaluate()
then:
project.configurations.findByName('jrubyStormLocal')?.dependencies?.matching {
it.name == 'storm-core'
}
}
}
/** Integration tests which actually execute Gradle via the GradleTestKit */
class JRubyStormTestKitSpec extends Specification {

View File

@ -1,5 +1,6 @@
package com.github.jrubygradle.storm
import org.gradle.api.artifacts.Dependency
import spock.lang.*
import org.gradle.api.Project
@ -105,4 +106,46 @@ class JRubyStormSpec extends Specification {
then:
project.configurations.findByName(JRubyStorm.DEFAULT_CONFIGURATION_NAME)
}
def "evaluation of the project should result in an assemble and run task"() {
given:
Project project = ProjectBuilder.builder().build()
project.apply plugin: 'com.github.jruby-gradle.storm'
when:
project.evaluate()
then:
project.tasks.findByName('assembleJRubyStorm')
project.tasks.findByName('runJRubyStorm')
}
def "evaluation of the project should result in dependencies being added to the configuration"() {
given:
Project project = ProjectBuilder.builder().build()
project.apply plugin: 'com.github.jruby-gradle.storm'
JRubyStorm task = project.task('spock', type: JRubyStorm)
def deps = task.configuration.dependencies
when:
project.evaluate()
then:
deps.matching { Dependency d -> d.name == 'redstorm' }
}
def "evaluation of the project should result in local mode dependencies"() {
given:
Project project = ProjectBuilder.builder().build()
project.apply plugin: 'com.github.jruby-gradle.storm'
JRubyStorm task = project.task('spock', type: JRubyStorm)
when:
project.evaluate()
then:
project.configurations.findByName('jrubyStormLocal')?.dependencies?.matching {
it.name == 'storm-core'
}
}
}

View File

@ -2,6 +2,7 @@ package com.github.jrubygradle.storm.internal
import com.github.jrubygradle.jar.JRubyJar
import org.gradle.api.Project
import org.gradle.api.artifacts.Dependency
import org.gradle.testfixtures.ProjectBuilder
import spock.lang.*