This post originated from an RSS feed registered with .NET Buzz
by Christian Horsdal.
Original Post: Why Do I Like Spec-Style Unit Tests?
Feed Title: Horsdal
Feed URL: http://www.horsdal-consult.dk/feeds/posts/default
Feed Description: A blog that will be about code, architecture, design, and .NET.
As I've written about earlier I've been spending some time lately learning Scala. A side effect has been learning and using two test frameworks I haven't used before; ScalaTest and Scala Specs. Both offer what I think of as a spec style of writting tests. That is, tests along the lines of:
"A unit under test" should {
"be tested by specs like this" in {
// Code for the first actual case