I’ve heard a lot of weird things about TDD in Monorail. As a bastard child (open source project based on closed source technology—can you please open source C# please MS) project Monorail comes with its own gotchas. So far I have discovered two problems that I have worked through.
1. For whatever reason, you are stuck with the version of Nunit that the Castle distribution comes with. You can get the source and try to figure out whats broken here, but, if you encounter strange exceptions when running tests in Nunit-Gui then a likely cause will be that you’re Nunit-Gui version and the Monorail version of Nunit do not match. I consistently got a “accessing an unloaded appdomain” exception.
2. Make sure that anything stored in property bags is serializable. This was a weird one, being that the actual exception ends up being “System.IO.FileNotFoundException : Could not load file or assembly.” In reality I discovered that a call to AssertPropertyBagContains was failing because an item I was storing in the propertybag was not serializable. Easy fix for this is to add the Serializable attribute to the class and check for any custom Serialization stuff (changing collections to list and dictionary should fix problems with serialization).