[rspec-devel] [ rspec-Bugs-11793 ] should raise_error('with a message') does not work correctly

noreply at rubyforge.org noreply at rubyforge.org
Sat Jun 23 06:12:20 EDT 2007


Bugs item #11793, was opened at 2007-06-23 10:11
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11793&group_id=797

Category: expectation module
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: David Chelimsky (dchelimsky)
Assigned to: David Chelimsky (dchelimsky)
Summary: should raise_error('with a message') does not work correctly

Initial Comment:
The following example passes:

describe "should raise_error(message)" do
  it "should pass if RuntimeError is raised with the right message" do
    lambda {raise 'blah'}.should raise_error(RuntimeError, 'blah')
  end
end

However, this one fails:

describe "should raise_error(message)" do
  it "should pass if RuntimeError is raised with the right message" do
    lambda {raise 'blah'}.should raise_error('blah')
  end
end

They should both pass.

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

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-06-23 10:12

Message:
Fixed in r2107.

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

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


More information about the rspec-devel mailing list