Displaying 1 result from an estimated 1 matches for "test_error_no_such_group".
2007 Jan 11
0
writing tests for rescue_action_in_public
...the local rescue_action, so the test won''t stop when  
rails hits an error (I assume this is what I want, because I want to  
continue processing the error, not stop):
group_controller_test.rb
------------------------
# class GroupController; def rescue_action(e) raise e end; end
   def test_error_no_such_group
     post :home, :id => "this_is_not_a_valid_id"
     assert_tag :content => "oops"
   end
When I run this test, the test.log shows the expected  
"ActiveRecord::RecordNotFound (Couldn''t find Group with  
ID=this_is_not_a_valid_id)" but the test passes...