I think it would be better to move this to a function in spec_helper.rb