@srowen, if this happens in practice, it must be something wrong with the test sample. In such cases, model are equally good and bad, and we just need to define an AUC value for it. If we force the ROC curve starts at (0,0) and ends at (1,1), the AUC for all positives is 1.0 and for all negatives is 0.0. I'm okay with any value for this corner case because it is not a practical concern. Just want to find a reference and make sure the formula is correct.