Fix #308: Expects decorator does work with code_of