Merge pull request #2842 from stavarotti/master

Prefer `expect` over `assert` for testing