Created
February 24, 2017 06:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def "myMethod without arguments has side effect 1" { | |
when: | |
myMethod() | |
then: | |
// assert side effect 1 | |
} | |
def "myMethod without arguments has side effect 2" { | |
when: | |
myMethod() | |
then: | |
// assert side effect 2 | |
} | |
def "myMethod without arguments throws an exception when something" { | |
given: | |
// some bad state | |
when: | |
myMethod() | |
then: | |
thrown SomeException | |
} | |
def "myMethod with arguments has side effect 1" { | |
when: | |
myMethod("some string") | |
then: | |
// assert side effect 1 | |
} | |
def "myMethod with arguments has side effect 2" { | |
when: | |
myMethod("some string") | |
then: | |
// assert side effect 2 | |
} | |
def "myMethod with arguments throws an exception when something" { | |
given: | |
// some bad state | |
when: | |
myMethod("some string") | |
then: | |
thrown SomeException | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment