You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
dependabot[bot] 31ac21a246
Bump maven-deploy-plugin from 2.8.2 to 3.0.0
3 years ago
.github Create dependabot.yml 3 years ago
.mvn/wrapper Update Gradle 7.5.1 and Maven 3.8.6 3 years ago
gradle/wrapper Update Gradle 7.5.1 and Maven 3.8.6 3 years ago
src/test Upgrade Maven project to Spock 2.0-M3, ... (#35) 5 years ago
.gitattributes Update Gradle 7.5.1 and Maven 3.8.6 3 years ago
.gitignore Update to Spock 2.0, Gradle 7.0.2, Maven 3.8.1 4 years ago
LICENSE initial commit 13 years ago
NOTICE initial commit 13 years ago
README.adoc Update docs 4 years ago
build.gradle Bump objenesis from 3.2 to 3.3 3 years ago
gradlew Update Gradle 7.5.1 and Maven 3.8.6 3 years ago
gradlew.bat Update Gradle 7.5.1 and Maven 3.8.6 3 years ago
mvnw Update to Apache Maven Wrapper and Maven 3.8.5 3 years ago
mvnw.cmd Update to Apache Maven Wrapper and Maven 3.8.5 3 years ago
pom.xml Bump maven-deploy-plugin from 2.8.2 to 3.0.0 3 years ago
settings.gradle added settings.gradle 13 years ago

README.adoc

[.float-group]
--
image::https://img.shields.io/badge/License-Apache%202.0-blue.svg[link=https://github.com/spockframework/spock/blob/master/LICENSE,float=left]
image::https://img.shields.io/github/checks-status/spockframework/spock-example/master.svg?label=Build[link=https://github.com/spockframework/spock-example/actions?query=workflow%3A%22CI+Builds%22+branch%3Amaster,float=left]
image::https://badges.gitter.im/spockframework/spock.svg[link=https://gitter.im/spockframework/spock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge,float=left]
--

== Spock Framework Example Project


The purpose of this project is to help you get started with Spock. The project includes several example specifications and build scripts for Ant, Gradle, and Maven. It also makes it easy to create an Eclipse or IDEA project, allowing you to run the example specs from within your IDE.

All three builds (Ant, Gradle, Maven) will automatically download all required dependencies, compile the project, and finally run the example specs. The Gradle build goes one step further by bootstrapping itself, alleviating the need to have a build tool preinstalled.

=== Prerequisites

- JDK 8 or higher
- Maven use `mvnw` wrapper
- Gradle use `gradlew` wrapper

NOTE: This example shows the usage of Spock 2.0, which uses the JUnit Platform. If you want to see how to get Spock 1.x with JUnit 4 up and running see the https://github.com/spockframework/spock-example/tree/spock-1.x[Spock-1.x] Branch.

=== Building with Gradle
Type:

    ./gradlew clean test

Downloaded files (including the Gradle distribution itself) will be stored in the Gradle user home directory (typically *user_home*`/.gradle`).

=== Building with Maven
Type:

    ./mvnw clean test

Downloaded files will be stored in the local Maven repository (typically *user_home*`/.m2/repository`).

=== Creating an Eclipse project

Install the https://projects.eclipse.org/projects/tools.buildship[Buildship plugin] if you want to use gradle as build tool.

=== Creating an IDEA project
Just open the project directory with Intelli IDEA and it should auto-detect the project settings.

=== Further Resources


* https://spockframework.org[Spock homepage]
* https://meetspock.appspot.com[Spock web console]
* https://docs.spockframework.org/[Main documentation]
* https://stackoverflow.com/questions/tagged/spock[Spock on Stackoverflow]
* https://gitter.im/spockframework/spock[Spock Chat]
* https://github.com/spockframework/spock/discussions[Discussion group]
* https://issues.spockframework.org[Issue tracker]
* https://twitter.com/spockframework[Spock on Twitter]
* https://gradle.org[Gradle homepage]
* https://groovy-lang.org/[Groovy homepage]
* https://maven.apache.org[Maven homepage]

If you have any comments or questions, please direct them to the Spock discussion group. We appreciate all feedback!

Happy spec'ing!

The Spock Framework Team