Make specs more compatible with Rails 4

Patch from @agrobbin in
https://github.com/collectiveidea/delayed_job/pull/490#issuecomment-14267485