Fix uses of shared examples in specs
Created by: n-b
We sometimes used shared_examples wrongly in rspec, along with it_behaves_like
. it_behaves_like
doesn't support multiple contexts in one call; it needs to be called once for each class. RecurrenceConcernSpec
did run the multiple contexte internally, but ExpirationSpec
and PhoneNumberValidationSpec
only ran the tests for the first class. Additionally ExpirationSpec did fail for PlageOuverture.
Checklist avant review:
-
reparcourir le code rapidement pour voir les problèmes évidents (fichiers touchés inutilement, debug logs qui trainent…). -
Tester la fonctionnalité sur la review app