Skip to content

Instantly share code, notes, and snippets.

@Stepwise
class ASpecThatBuysAProduct extends Specification {
abstract buyProduct(product) {
when:
to ProductsPage
buy(this.product)
then:
at CartPage
}
// HELPER: #key_value
//
// Usage: {{#key_value obj}} Key: {{key}} // Value: {{value}} {{/key_value}}
//
// Iterate over an object, setting 'key' and 'value' for each property in
// the object.
Handlebars.registerHelper("key_value", function(obj, fn) {
var buffer = "",
key;