Skip to content

Conversation

@freesteph
Copy link

The only impact being in the generated documentation (via description_clauses_for_qualifiers):

before:

is expected to validate that Y lies inside the range R

after

is expected to validate that X lies inside the range R producing a
custom validation error on failure

As with_low_message already does.

The only impact being in the generated documentation (via
description_clauses_for_qualifiers):

before:

> is expected to validate that Y lies inside the range R

after

> is expected to validate that X lies inside the range R producing a
custom validation error on failure

As with_low_message already does.
Copy link
Member

@matsales28 matsales28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding a spec to cover this case?

I think you can do something similar to the one on spec/unit/shoulda/matchers/active_model/validate_numericaly_of_spec.rb

it 'describes that it relies upon a strict validation' do
matcher = validate_numericality_of(:attr).strict
expect(matcher.description).to eq(
'validate that :attr looks like a number, raising a validation exception on failure',
)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants