Skip to content

Instantly share code, notes, and snippets.

@alvarosanchez
Last active August 29, 2015 14:02
Show Gist options
  • Save alvarosanchez/0cfddb883723bfc1d208 to your computer and use it in GitHub Desktop.
Save alvarosanchez/0cfddb883723bfc1d208 to your computer and use it in GitHub Desktop.
class GameSpec extends Specification {
@Shared
RESTClient restClient = new RESTClient("http://localhost:8080/restful-gr8conf-2014")
def "it returns a list of games in JSON"() {
when:
Response response = restClient.get(path: "/games", accept: ContentType.JSON)
then:
response.json
response.contentType == 'application/json'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment