Refactored tests and code to raise NoRouteError when no path found