[rspec-devel] [ rspec-Feature Requests-12132 ] succeed matcher

noreply at rubyforge.org noreply at rubyforge.org
Mon Jul 9 18:10:44 EDT 2007


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

Category: expectation module
Group: None
Status: Open
Priority: 3
Submitted By: Brian Takita (btakita)
Assigned to: Nobody (None)
Summary: succeed matcher

Initial Comment:
Sometime I want to have a method that has a compound matcher.

The succeed matcher executes the block and returns true if there is no exception.

e.g.

"Foobar".should succeed do |obj|
  obj.to_s.should == "Foobar"
end # success

"Foobar".should succeed do |obj|
  obj.to_s.should == "Baz"
end # Failure

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

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


More information about the rspec-devel mailing list