Fix and modernize specs

No change to functionality or test coverage, but specs now PASS and
do not give any deprecation warnings.