Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am pniederw on github.
  • I am pniederw (https://keybase.io/pniederw) on keybase.
  • I have a public key whose fingerprint is 6287 23DB BE4A 61C8 FEBD D9D0 1B64 3CA2 BDE0 39E1

To claim this, I am signing this object:

// 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;
@Stepwise
class ASpecThatBuysAProduct extends Specification {
abstract buyProduct(product) {
when:
to ProductsPage
buy(this.product)
then:
at CartPage
}
We couldn’t find that file to show.
The Spock Quiz
Which version is a genuine Spock? Choose the right answer and win a trip to Vulcan!
A. B.
/* Seven lines of imports removed for clarity */ /* Zero lines of imports removed for clarity */
@RunWith(Parameterized.class) class HelloSpock extends spock.lang.Specification {
public class HelloSpock { def "length of Spock and friends"() {
/*
* Copyright 2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
public interface IRunListener {
void beforeSpec(SpecInfo spec);
void beforeFeature(FeatureInfo feature);
void beforeFirstIteration(int estimatedNumIterations);
void beforeIteration(Object[] args);
void afterIteration();
void afterLastIteration();
void afterFeature(FeatureInfo feature);
void afterSpec(SpecInfo spec);