Fix deprecation in specs

From https://github.com/gitlabhq/gitlabhq/pull/6053

![fixes](http://puu.sh/6lEHT.png)