I created the common.rb file in the intializer folder in rails 2.x application. Code below
def handle_exception &block begin yield block rescue Exception => ex logger.error(ex) HoptoadNotifier.notify(ex) end end
For the above, I want to write a test case. I think it should be in a functional test. If it is true. I donβt know what to call it, so I'm confused (controller name <<Base). Are the rails running this test case, like other controller tests? Or do we need to add it anywhere? Since the above code does not have a class that is inherited from the controller, etc., I will add additional information if you do not understand my question.
source share