fix rails4 enums attribute issue

With a Rails 4 enum field the changed attributes hash contains the
mapped value and when prev[attr] assigns the value it will be lost.
Only run tests for ActiveRecord::Enum when it is defined
Merge branch 'enums'

Conflicts:
	CHANGELOG.md