Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Spock Framework. #358

Merged
merged 1 commit into from
Jul 14, 2018
Merged

Conversation

jsalinaspolo
Copy link
Contributor

@jsalinaspolo jsalinaspolo commented Jul 14, 2018

Using ScenarioSpec allow to use JGiven with Spock Framework.

Simple example

    def "something should happen"() {
        expect:

        given().some_state()
        when().some_action()
        then().some_outcome()
    }

Supports Spock Parameters (looks awesome in the reports)

    @Unroll
    def "be able to use tables #param"() {
        expect:
        given().some_state_$(param)
        when().some_action()
        then().some_outcome()

        where:
        param        | _
        "param"      | _
        "word param" | _
    }

Thanks @jordi9 for the Spock Spec and the inspiration.

@jsalinaspolo jsalinaspolo changed the title Add support for Spock. Add support for Spock Framework. Jul 14, 2018
@janschaefer
Copy link
Contributor

How cool is that?? I always considered Spock as an JGiven alternative and would never have thought about combining both. Truly amazing!

@janschaefer janschaefer merged commit 6cd3a57 into TNG:master Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants