Added spock framework

This commit is contained in:
Artur Kmieckowiak 2020-01-11 09:46:21 +01:00
parent 4109acfab7
commit ced78faf6b
3 changed files with 31 additions and 1 deletions

View File

@ -8,10 +8,17 @@ group = 'com.fnecan.study'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
jcenter()
}
apply plugin: 'groovy'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-security'
@ -20,8 +27,16 @@ dependencies {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.security:spring-security-test'
testCompile (
'org.codehaus.groovy:groovy-all:2.4.4',
'org.spockframework:spock-core:1.0-groovy-2.4'
)
testRuntime(
'com.athaydes:spock-reports:1.2.7'
)
}
test {
useJUnitPlatform()
}
}

View File

@ -0,0 +1,15 @@
package com.fnecan.study.bookapi
import spock.lang.Specification
class ExampleTest extends Specification {
def "It should run the application" () {
when:
def a = 1;
then:
a == 1
}
}