Fix deprecation in specs

From https://github.com/gitlabhq/gitlabhq/pull/6053