Fix broken tests

Rubocop and some spec tests were broken with the latest versions of the
dependent libraries.