#116 new
Chad Humphries

[#13645] Support for alternative expectations

Reported by Chad Humphries | November 19th, 2007 @ 06:26 AM

I would like to be able to do something like:

@model.should_receive(:save).and_return(true).or_receive(:save!).and_raise(ActiveRecord::RecordNotSaved)

At the moment I must stub both methods, and that does the work, but that way I'm not specifying what is supposed to happen.

This allows more verbosity.

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Behaviour Driven Development for Ruby.

Shared Ticket Bins

People watching this ticket