We're using MSpec for unit tests after having previously used MbUnit.
I'm used to being able to say
Assert.IsTrue(status, "Status should be true");
in MbUnit, i.e. adding a message to the assertion which is output if it fails.
I can't find any corresponding functionality in MSpec. I'm testing that some XML validates and, if it fails, I want to report the validation error message. So my MSpec code looks like
string message;
bool isValid = ValidateXml(myXml, out message);
isValid.ShouldBeTrue();
But I want to be able to add the message
to the test output if the ShouldBeTrue()
fails.
Is this possible?