Use ActiveSupport::Deprecation.warn instead of warn
Dont use Class.embed on test