Spock’s where block makes testing similar conditions for a bunch of inputs very straightforward. Recently I was working on the Groovy language definition for the Prism syntax highlighter and wanted something similar.
I’ve been pretty enthusiastic about Angular for a while now but although I was encouraged by the consideration given to testing hadn’t really tried unit testing my Angular components. I’ve been using Casper to test end-to-end which has been good enough for the experimental stuff I’d been doing with Angular. When I recently started working on a real app with a fairly complex Angular controller it felt like I needed to define the logic with some fine-grained unit tests.