Skip to content

Instantly share code, notes, and snippets.

@jasnow
Last active January 12, 2016 19:15
Show Gist options
  • Save jasnow/0d0a88b68c8db4b68107 to your computer and use it in GitHub Desktop.
Save jasnow/0d0a88b68c8db4b68107 to your computer and use it in GitHub Desktop.
Two failed tests after upgrading 24pr project's shoulda-matchers gem to 3.1.0
If you upgrade the 24pr project's shoulda-matchers gem to 3.1.0,
you get these two failed tests:
```
Failures:
1) ProjectLabel validations must only have a label allocated to a project once
Failure/Error: is_expected.to validate_uniqueness_of(:label_id).scoped_to(:project_id)
ProjectLabel did not properly validate that :label_id is
case-sensitively unique within the scope of :project_id.
The record you provided could not be created, as it failed with the
following validation errors:
* label_id: ["can't be blank"]
2) Project should validate that :github_url is case-insensitively unique,
producing a custom validation error on failure
Failure/Error:
it { is_expected.to validate_uniqueness_of(:github_url).
case_insensitive.with_message('Project has already been suggested.') }
Project did not properly validate that :github_url is case-insensitively
unique, producing a custom validation error on failure.
The record you provided could not be created, as it failed with the
following validation errors:
* description: ["can't be blank", "is too short (minimum is 20
characters)"]
* github_url: ["can't be blank", "Enter a valid GitHub URL."]
* name: ["can't be blank"]
* main_language: ["can't be blank", "must be a programming language"]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment