Throwing away integration tests

In the beginning (like, couple months ago), I thought that in order to test certain features in my game, I had to either write really long-winded setup functions or access filesystem and load data from there. I chose not to access filesystem, because it would create nasty coupling between some datafile and my tests, instead I wrote long-winded setup and hid it away in class called IntegrationTest.

That module started accumulating all kinds of cruft over the time, stub models, stub random number generators and stub configurations. It worked ok though.

Today I emptied that module, threw away IntegrationTest Class and rewrote the tests that were using it. In the process couple tests got deleted, because I didn’t need them anymore. Now setting up is done with those nifty little builder objects, that can create pretty much anything I want in just couple of lines.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s