[rspec-devel] [ rspec-Feature Requests-13645 ] Support for alternative expectations

noreply at rubyforge.org noreply at rubyforge.org
Mon Nov 19 00:26:51 EST 2007


Feature Requests item #13645, was opened at 2007-09-04 06:33
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=13645&group_id=797

Category: mock module
Group: None
Status: Open
Priority: 3
Submitted By: Rodrigo Alvarez (papipo)
Assigned to: Nobody (None)
Summary: Support for alternative expectations

Initial Comment:
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.

----------------------------------------------------------------------

Comment By: Chad Humphries (spicycode)
Date: 2007-11-19 00:26

Message:
Moved to http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/116-13645-support-for-alternative-expectations

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=13645&group_id=797


More information about the rspec-devel mailing list