Ruby hacks for sanity on big projects*
On larger projects with more teammates, basic sanity can be difficult. Here we will cover some sanity-saving measures, from single tests that you should always write, to overrides for ActiveRecord
On larger projects with more teammates, basic sanity can be difficult. Let’s look at some code samples that can help.
Fail a test if any classes have a different filename than class name.
Fail a test if there are any binding.pry or puts statements in the codebase.
Require spec_helper in all files… without requiring it in any files.
Find variable lists that are almost completely in alphabetic order.
In your tests, fix permissions on private keys for integration tests, because git literally cannot let you commit them.
Only company-internal stuff