[rspec-devel] [ rspec-Feature Requests-6091 ] should_raise should match error messages

noreply at rubyforge.org noreply at rubyforge.org
Thu Oct 26 11:33:11 EDT 2006


Feature Requests item #6091, was opened at 2006-10-11 02:10
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6091&group_id=797

Category: mock module
Group: None
Status: Open
Priority: 3
Submitted By: David Chelimsky (dchelimsky)
Assigned to: Nobody (None)
Summary: should_raise should match error messages

Initial Comment:
context "the should_raise expectation" do
  specify "should accept and verify an expected message using equality" do
    lambda do
      raise 'Hello'
    end.should_raise(StandardError).with_message "Hello"
  end
  specify "should accept and verify an expected message using regex matching" do
    lambda do
      raise 'Hello'
    end.should_raise(StandardError).with_message_matching /ello/
  end
end


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

>Comment By: David Chelimsky (dchelimsky)
Date: 2006-10-26 15:33

Message:
Added - will be in 0.7

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

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


More information about the rspec-devel mailing list