Update gems and fix deprecated methods in tests