Skip to content

Commit

Permalink
[branch sc46794] Upgrade to Spock 2 (#23)
Browse files Browse the repository at this point in the history
* Upgraded to Spock 2

* Upgraded to Spock 2

* Upgraded to Spock 2

* fixed JUnit version and missing JUnit Platform Engine
  • Loading branch information
musketyr committed Nov 10, 2021
1 parent 205f160 commit fe47561
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,12 @@ subprojects { Project subproject ->

testCompile "io.micronaut:micronaut-inject-groovy"

testCompile("org.spockframework:spock-core:$spockVersion") {
exclude group: "org.codehaus.groovy", module: "groovy-all"
}

testCompile platform("org.junit:junit-bom:$junitVersion")
testCompile "org.junit.jupiter:junit-jupiter-engine"
testCompile "org.junit.jupiter:junit-jupiter-api"

testCompile("org.spockframework:spock-core:$spockVersion")
testCompile 'cglib:cglib-nodep:3.2.0'
testCompile 'org.objenesis:objenesis:1.2'

Expand All @@ -169,6 +172,7 @@ subprojects { Project subproject ->
compileTestJava.options.compilerArgs += '-parameters'

test {
useJUnitPlatform()
environment 'AWS_CBOR_DISABLE', 'true'
systemProperty 'TEST_RESOURCES_FOLDER', new File(subproject.projectDir, 'src/test/resources').canonicalPath
systemProperty 'user.timezone', 'UTC'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dependencyManagement {
imports {
mavenBom "io.micronaut:micronaut-bom:$micronautVersion"
mavenBom "org.grails:grails-bom:${grailsVersion}"
mavenBom "org.junit:junit-bom:$junitVersion"
}
}

Expand All @@ -64,7 +65,7 @@ dependencies {
compile project(':micronaut-grails-web-boot')
compile project(':micronaut-grails-domain-library')

testCompile 'com.agorapulse:gru-http:0.8.4'
testCompile "com.agorapulse:gru-http:$gruVersion"

developmentOnly("org.springframework.boot:spring-boot-devtools")
compile "org.springframework.boot:spring-boot-starter-logging"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ import com.agorapulse.gru.http.Http
import com.agorapulse.micronaut.grails.domain.ManagerService
import com.agorapulse.micronaut.grails.example.DirectlyInjected
import com.agorapulse.micronaut.grails.example.InjectedUsingBridge
import org.junit.Rule
import org.springframework.context.ConfigurableApplicationContext
import spock.lang.AutoCleanup
import spock.lang.Shared
import spock.lang.Specification

abstract class AbstractApplicationSpec extends Specification {

@Shared ConfigurableApplicationContext context

@Rule Gru gru = Gru.equip(Http.steal(this)).prepare('http://localhost:9999')
@AutoCleanup Gru gru = Gru.equip(Http.steal(this)).prepare('http://localhost:9999')

abstract Class<?> getApplicationClass()

Expand Down
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ version = 3.0.0-SNAPSHOT

micronautVersion = 1.2.11
grailsVersion=4.0.4
gruVersion = 0.8.2
druVersion = 0.6.0
gruVersion = 0.9.4
druVersion = 0.8.1
groovyVersion = 2.5.8
spockVersion = 1.3-groovy-2.5
spockVersion = 2.0-groovy-2.5
junitVersion = 5.7.2
awsSdkVersion = 1.11.656
awsSdk2Version = 2.9.24
testcontainersVersion = 1.15.3
Expand Down

0 comments on commit fe47561

Please sign in to comment.