[rspec-users] specing rescue, ensure and else blocks of an Exception

David Chelimsky dchelimsky at gmail.com
Fri Oct 26 08:02:38 EDT 2007

On 10/26/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> On 10/26/07, Tarsoly András <tarsolya at gmail.com> wrote:
> Take a look at http://pastie.caboo.se/111125 (reorganized from your
> example). Note that each example is about what the controller does,
> not what the model does. Also note that there are no "and"s in any of
> the labels. Each example sets up one thing and describes what happens
> when the action is invoked based on those conditions.
> HTH,
> David

Here's an alternative broken down into more granular specs:

Generally I find that I don't break up my controller specs like that,
but I break up specs for models like that all the time, so maybe I
should be doing them this way :)

More information about the rspec-users mailing list