fix build failure

(https://travis-ci.org/gitlabhq/gitlabhq/builds/3593153)
Merge pull request #2249 from jouve/fix_possible_spec_failure

fix one of the possible causes of build failures