RubyFlow The Ruby and Rails community linklog

How I test Rails validations?

Comments

Thanks for sharing :)

You should checkout shoulda-matchers they will help you save some time with some validation tests.

ValidAtribute does exactly the type of tests you are running: https://github.com/bcardarella/valid_attribute

shoulda-matchers + 1 :)

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in