Test suite: Portfolio test files don't properly override the subject()
Alexangelj opened this issue · comments
Description
If the subjects.last
variable is altered, the ghost state's subject
variable also has to be updated. This happens in the setup, but the Portfolio overrides happen after the setUp function runs.
Making a function in the root setUp function in the Setup.sol file will fix this issue:
function _change_subject(address new_subject) internal virtual {
subjects().change_subject(new_subject);
_ghost.subject = address(_subjects.last);
}