2011-02-23

Let's Code Dimdwarf #39: More Test Cases

It's time to write tests for the error cases. Because Specsy allows unlimited nested tests (0..*), adding multiple test fixture setups is easy - surround the existing tests with a new test block and you have a new test setup for just those tests. Even I was surprised by how easy it is.

P.S. Doesn't (0..*) look like a smiliey to you? :D

Download as MP4

Episode Archive

2011-02-19

Let's Code Dimdwarf #38: More Refactoring

Still some more cleaning up of the production and test code until they are tidy enough for us to move forward.

Download as MP4

Episode Archive

2011-02-15

Let's Code Dimdwarf #37: Refactoring

The methods were easy to move to another class when they all were static, but extracting the class does not end there - the design needs to be made right.

Download as MP4

Episode Archive

2011-02-11

Let's Code Dimdwarf #36: Safety Net

I will start by writing one unit test to cover the application loading, after which it will be safe to extract the code into its own class.

Download as MP4

Episode Archive

2011-02-07

Let's Code Dimdwarf #35: Test-After

I begin writing tests for application class loading. I had planned on test-driving some new code, but because I so seldom write code test-after, instead I decided to refactor the existing code and make it testable as if dealing with legacy code.

Download as MP4

Episode Archive

2011-02-03

Let's Code Dimdwarf #34: Unique Temporary Directories

When creating temporary directories in tests, a timestamp and a global variable is not unique enough. You should always assume that the tests will be run in parallel. Even when the test runner you are using does not have built-in support for running them in parallel (though it could in the future), it's possible to run the same test suite multiple times in different processes (which may happen especially on CI servers - I once had tests conflicting because of listening on a fixed network port number).

Download as MP4

Episode Archive