this should be:

<pre>
expect(response.body).to have_content(custom_field.name)
</pre>

Otherwise, changes in the factory will break your test.