I am working on practicing TDD/BDD/ATDD and I am working on a
I created a helper method that depends conditionally on the type of controller being tested.
module ApplicationHelper def devise_add_flash if controller.devise_controller? flash.now[:error] = flash[:error] + resource.errors.full_messages end end end
Is unit testing this a bad idea? Should I be testing the "end behaviour" of this method (e.g. checking the flashes appear at the controller/view level) since that is really the "API" I care about maintaining, not the implementation of flash, etc.?
Am I approaching this the correct way?