Conversation
**Why**: To make sure the correct class is called each time. Otherwise, a class that was set by a previous spec will still be in effect for the next test, but might be the wrong class for that test.
|
This was failing the Circle CI run for my other PR: https://circleci.com/gh/18F/identity-idp/193?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link |
|
This kind of global mutable state is usually a smell, should we change how this is set (ex make it a constructor param) or add some before-each stuff to the suite to reset to a known value? |
zachmargolis
left a comment
There was a problem hiding this comment.
LGTM thanks for catching!
|
I'll look into it, but I don't think a reset would have helped here. We have several specs that each depend on a specific service. For testing SMS, we want to use |
Why: To make sure the correct class is called each time. Otherwise,
a class that was set by a previous spec will still be in effect for the
next test, but might be the wrong class for that test.