Skip to content

Instantly share code, notes, and snippets.

Created July 27, 2010 01:09
Show Gist options
  • Save anonymous/491549 to your computer and use it in GitHub Desktop.
Save anonymous/491549 to your computer and use it in GitHub Desktop.
class BuyProductStory extends spock.lang.Story {
@Shared product
def "buy product"() {
when:
to ProductsPage
buy(this.product)
then:
at CartPage
}
}
@Stepwise
class ASpecThatBuysAProduct extends Specification {
// some feature methods
def "buy the product"() {
story:
BuyProductStory, product: Product.get(2)
}
// some other feature methods
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment