I'm puzzled why my functional tests are failing. I have the following
assert_raise ActiveRecord::RecordInvalid do
post :create, :page_id => id_from_fixture, :body => "bla bla"
In my controller, I am catching the error:
@page = current_user.pages.find(params[:page_id])
When I run the test, it fails on the grounds that 'nothing was
raised'. But I know for sure that the error was raised, because when I
remove the assert_raise test and just check the redirect, the test
Is it because I already rescue in the controller that the assertion
doesn't see the error anymore?