Prevent attr_encrypted models from being overriden
Prevent attr_encrypted models from being overriden

Fix failing spec in spec/controllers/admin/hooks_controller_spec.rb

attr_encrypted expects models to have their attribute methods defined,
or it will override them with standard Ruby accessors. Migration specs
that rolled back the state of the database after columns were migrated
to encrypted values were interfering with these definitions. To ensure
that the SystemHook specs pass, we need to call
`SystemHook.define_attribute_methods` to ensure that attr_encrypted sees
the right methods that reflect the latest state of the database.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/8234

dreampet/gitlab,mmkassem/gitlabhq,axilleas/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,dreampet/gitlab,stoplightio/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,iiet/iiet-git,mmkassem/gitlabhq,dreampet/gitlab,iiet/iiet-git,mmkassem/gitlabhq,axilleas/gitlabhq,dreampet/gitlab,axilleas/gitlabhq,stoplightio/gitlabhq