The previous way was working fine with Rails 4, but now the referer was returning nil and therefore raising an error in this spec.
The previous way was working fine with Rails 4, but now the referer was returning nil and therefore raising an error in this spec.