removed Rails.env.test? as not used