This latest release actually removed the need for a pair of parens in many cases. So instead of:
1 |> should (equal 1)
you can now write:
1 |> should equal 1
Getting rid of parens at this level is pretty important to me so it's pleasure to bid them adieu!
One of the other major changes was perhaps more for my sake than for the user's but then maybe not. Prior releases incorporated negation into the assertion bit itself. So if you wanted to say "1 should not equal 2" you had to write:
1 |> should (notEqual 2)
not'keyword makes it possible to negate any assertion in FsUnit:
1 |> should not' (equal 2)This removed a lot of duplicate code and it also just about cut the number of specs for FsUnit itself in half.
Finally, the last major change is the
speckeyword. This keyword is a shortcut for labeling and executing your specs. It also stores the result in a ResultStore object. With the
speckeyword, specs look like this:
spec "A number should equal itself."
(1 |> should equal 1)
I like the way that this looks very much and I'm going to try to keep this syntax stable between releases.
Let me know what you think of the new release!