[rspec-devel] [ rspec-Bugs-10744 ] should raise_error not working in new controller specs

noreply at rubyforge.org noreply at rubyforge.org
Thu May 10 12:26:17 EDT 2007


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

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Paul Pagel (paulwpagel)
Assigned to: Nobody (None)
Summary: should raise_error not working in new controller specs

Initial Comment:
I have the following spec

  it "Should raise exception when ***" do
    lambda{post :index, :key => '987'}.should raise_error(Exception)
  end

which fails because of

'The LoginController Should raise exception when packet is not found' FAILED
expected Exception but nothing was raised
login_controller_spec.rb:42:

and in the controller i have an index method which does throw an exception, which I can verify by wrapping it in a begin/rescue block, but the spec still fails.

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

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


More information about the rspec-devel mailing list