I had intended to write a nice article showing a concrete example of learning tests in action, then something wonderful happened: all the code disappeared.
I upgraded to Mac OS 10.10 Yosemite and something strange happened with my installations of IntelliJ IDEA. They just disappeared. I still don’t know what happened to them. When I tried to reinstall IDEA 13 Community Edition, it crashed on launch.
How do I gain confidence in code that generates HTML, such as tag libraries or view templates?
Well, it depends on what I’m trying to do.
Almost everyone starts organizing their tests according to the module (or class or object) that they’re testing. If they have a class called
Customer, then they have a test case class called
CustomerTest and put all the tests for
Customer into this one bundle (module, class,
describe block, whatever you call it).
Learn one proven approach to help with the age-old chicken-and-egg problem of “I want to refactor this legacy code, but I’m afraid to change it without tests” and “I want to write tests, but I need to introduce some structure in order to write reasonably-focused tests”.
Some time ago a client asked me some questions about spies and mocks. I wanted to share what we discussed with you.
I think that programmers worry far too much about design.
I wanted to change some of the styling at jbrains.ca, but I have a legacy Wordpress template, so I needed a way to start making incremental changes with something remotely approximating tests. I knew that I didn’t want to have to crawl every page to check that every pixel remained in the same place, in part because that would kill me, and in part because I don’t need every pixel to remain in the same place. I needed another way.