-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests Fail : CouchRest::Model::Validations::Uniqueness #192
Comments
Hi! I suspect something has changed in ActiveModel 4.2 and validation. I've not tested against this version yet and we don't have any plans to upgrade just at the moment, but I'll take a look unless anyone else gets there first. |
I'm on 4.1 and have not upgraded to 4.2 yet because I began to get this deprecation warning:
When I comment out uniqueness validators, the warning goes away. I have format and presence validations as well, but they don't cause this warning. |
The following change fixes the issue. I ran the unit/validations_spec.rb to be sure. By the way, what's the proper way to set username and password to run specs? I tried changing COUCHHOST in spec_helper but that didn't do it, so I temporarily hard coded configuration.rb to run the specs. In any event, here's the modification to validations/uniqueness.rb
The same pattern is found at: https://github.com/johncarney/validates_timeliness/blob/master/lib/validates_timeliness/validator.rb |
HI Sam,
I'm receiving this during "rake spec". If you could provide any advice, I am prepping a pull request to update dependencies (mime_types gem) for Rails/ActiveModel 4.2.
I notice during debugging this, that during the test, UniquenessValidator#setup is never called.
The text was updated successfully, but these errors were encountered: