Skip to content

Tests Fail : CouchRest::Model::Validations::Uniqueness #192

@pjfitzgibbons

Description

@pjfitzgibbons

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.

RuntimeError: View WithUniqueValidation.by_title does not exist for validation!
./lib/couchrest/model/validations/uniqueness.rb:38:in `validate_each'
./lib/couchrest/model/validations.rb:31:in `valid?'
./lib/couchrest/model/persistence.rb:108:in `perform_validations'
./lib/couchrest/model/persistence.rb:10:in `create'
./lib/couchrest/model/persistence.rb:133:in `create'
./spec/unit/validations_spec.rb:9:in `block (5 levels) in <top (required)>'
./spec/unit/validations_spec.rb:9:in `map'
./spec/unit/validations_spec.rb:9:in `block (4 levels) in <top (required)>'

1 example, 1 failure, 0 passed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions