On Tue, Nov 27, 2012 at 2:22 PM, Henning Thielemann <lemming@henning-thielemann.de> wrote:

On Tue, 27 Nov 2012, Michael Snoyman wrote:

Sure, in some cases that's true. The idea would be to structure the test case in such a way that we no with
certainty which way it will fail. Simon's initial example will always fail in the same way.

The message for head of empty list may be changed without warning ...

That argument can be applied to any form of automated testing.

doSomething :: Int -> Int

doSomething 5 `shouldBe` 6

If the behavior of doSomething suddenly changes, then your test will fail. In fact, that's one of the *advantages* of having a test suite: it catches these kinds of unexpected changes.

Michael