Generators use newer `expect` syntax

Closes #839