Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Included Spock

  • Loading branch information...
commit cf993de8eae9ed91770966c4b5fc812797e679c7 1 parent 04803ce
Andrey Paramonov authored
Showing with 57 additions and 1 deletion.
  1. +20 −1 pom.xml
  2. +37 −0 src/test/groovy/com/ndpar/gtesting/SpokTest.groovy
View
21 pom.xml
@@ -20,7 +20,7 @@
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-5</version>
<configuration>
- <providerSelection>1.6</providerSelection>
+ <providerSelection>1.6</providerSelection>
<debug>false</debug>
<verbose>true</verbose>
<stacktrace>true</stacktrace>
@@ -33,6 +33,19 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.spockframework</groupId>
+ <artifactId>spock-maven</artifactId>
+ <version>0.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>find-specks</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
@@ -49,5 +62,11 @@
<version>1.6.3</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.spockframework</groupId>
+ <artifactId>spock-core</artifactId>
+ <version>0.1</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
View
37 src/test/groovy/com/ndpar/gtesting/SpokTest.groovy
@@ -0,0 +1,37 @@
+package com.ndpar.gtesting
+
+import org.junit.runner.RunWith
+import spock.lang.*
+
+@Speck
+@RunWith(Sputnik)
+class SpockTest {
+
+ def app
+
+ def setup() {
+ app = new App()
+ }
+
+ def "next number is 6"() {
+ when:
+ def number = app.number
+
+ then:
+ number.next() == 6
+ }
+
+ def "two plus two is four"() {
+ expect:
+ 2 + 2 == 4
+ }
+
+ def "can you figure out what I'm up to?"() {
+ expect:
+ name.size() == size
+
+ where:
+ name << ['Kirk', 'Spock', 'Scotty']
+ size << [4, 5, 6]
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.