Use before_filter for Rails 3 compatility in tests