How to generate a test file for an existing rails model

If you forgot to create a test file for your model, use this simple command to generate the empty scaffolding file for your Model’s unit test.

rails g test_unit:model <modelname>

Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.

You may also like...