make tests compatible with Rails 4