Rails 4 introduced ActiveModel, ActiveModel::Validations and ActiveModel::EachValidator. Instead of injecting ourselves into ActiveRecord::Base, we will be automatically picked up.
We can now also be used on ActiveModel as well as ActiveRecord. This simplifies testing.
This does mean it requires at least Rails 4. If that's unacceptable I can add a shim for Rails 3.
Also
rspec-rails was dropped because it seems to want all of Rails loaded.
We only needed one convenience method, errors_on. It has been copied into our test model.
Bumped our runtime dependency to activemodel >= 4.0. Dropped the others.
Dropped the development dependency on all of Rails. We only need ActiveModel.
Closes #10
Rails 4 introduced ActiveModel, ActiveModel::Validations and ActiveModel::EachValidator. Instead of injecting ourselves into ActiveRecord::Base, we will be automatically picked up.
We can now also be used on ActiveModel as well as ActiveRecord. This simplifies testing.
This does mean it requires at least Rails 4. If that's unacceptable I can add a shim for Rails 3.
Also