< mockra >

Rails Formulaic - Form Testing - 14 Jul 2016

If you’re already using factory girl and want to clean up your test suite, then the Formulaic gem is a great option. It allows you to pass in a hash of attributes to fill out a form.

Here’s an example:

  fill_form_and_submit(:user, :new, attributes_for(:user))