+1 again. A big part of UT is to allow ease of refactoring. Part of refactoring is, IMO, making exceptions more specific (eg from raise "No record found" to raise DBException, "No record found") and the like. Having to change your UT's when you want to refactor is a bit self defeating. Jim Weirich wrote: > Eric Hodel wrote: > > For a given input a method should only raise one class of exception. > > The restriction forces you to write better tests. > > The reason I would like it is that the test is the specification of the > behavior. I often wish to specify that a method will raise a more > general exception than the one it actually raises. The actual exception > raised may be an implementation detail that I don't wish to have > expressed in the spec. > > -- > -- Jim Weirich > > -- > Posted via http://www.ruby-forum.com/.