Code ContractAnything that can go wrong, will go wrong. --
Murphy's lawWhen deploying my site to FaceBook, I've got a surprise. What could have been wrong with showing the default page?

It turns out FaceBook does a POST not GET to /. And my routing did not handle POST to /. Lesson learnt, we always have to be defensive.
Good news is that Rabbit Framework's assert functions are there ready for defensive programming. We can use them to define code contracts, preconditions, post conditions and object invariants. Why not?
@inherits CrudController
@{
Layout = SiteEngine.RunHook("get_layout") as string;
this.Run("Pages", "Page");
Assert.IsTrue(Page.View != null, "View has not been set.");
Assert.IsTrue(Page.Model != null, "Model has not been set.");
//…
}
@RenderPage(Page.View, Page.Model)