3 ms·
Rails freelancer here. The first thing that surprises me is that the author talks about 'wasting' time, which is 'his precious resource'. How is that? The mor
by vemv 11y ago
Rails freelancer here.
The first thing that surprises me is that the author talks about 'wasting' time, which is 'his precious resource'.
How is that? The more you work, the more you bill, if you got any decent deal with your client.
I've maintained many existing Rails projects. Personally the FIRST thing I do when joining a project is adding/improving the test suite. Often the owner will hesitate, but selling the merits of a technical decision should be part of your freelancer skillset.
Just like the author, I give a special importance to Capybara tests, for the simple reason that they implicitly hit the full stack.
However, I test anything else that can be reasonably tested. Controller tests are important for testing APIs, authorization, and more. Personally I like to set `render_views` so controllers specs implicitly assert that the views can be rendered.
If your app has any real business logic in it, you'll want to test models as well.
Do your mails render, and your jobs run? Only tests can tell (in the long term).
Well-written, non-redundant tests are priceless for your own sanity, and also for the health/viability of the project. Someone WILL maintain your project after your freelancer deal is over.
ps - I don't TDD.