3

I'm looking for a convenient way to test validations of a Reform-based form object.

Are there any matchers (like shoulda matchers for testing ActiveModel::Validations) to test dry-validations? Is this even the way to go?

Arvinje
  • 328
  • 2
  • 16

1 Answers1

0

There is this: https://github.com/bloom-solutions/dry-validation-matchers

I've enjoyed using shoulda matchers in the past. It helps to greatly cut down on the repetitive code where you first create a valid object and then change the attribute affected by the validation to an invalid value to carry out the test.

In the end this is just a matter of taste.

Praveen Angyan
  • 7,227
  • 29
  • 34