rails/rails — pull request #3438 by lazyatom (2011-10-26 11:59:52+00:00)
Title: Becomes includes errors

`ActiveRecord::Base#becomes` doesn't copy the errors information to the instance that it creates. This can be a pain if, for example, you're trying to use the returned instance in a form which expects to highlight fields with errors. It seems reasonable to expect that the returned instance share all the state of the original, including errors.

I've split this into two commits in case you'd prefer to use different models in the test (`Company` seemed like the clearest of the existing ones), or use a different implementation to fix it. If not, feel free to squash them.

Thanks!