|Session Leader Name #1||Neill Pearman|
|Session Leader Name #2|
|Session Title||Make Mine A Mocker|
|Session Length||30 mins|
|Session Description||My session proposal revolves around two things:- It seems quite common for the terms ‘mock’ and ‘stub’ to used incorrectly while talking about testing software, even though both are quite easy to define.- It’s also surprisingly easy to implement a class in Ruby that will act as a simple mocker and stubber, provided you have some idea about meta programming.With these two things in mind, I’ve written a set of koans that will describe what it is to be a mock and what it is to be a stub using Ruby and the Cucumber BDD framework for Software Craftsmanship 2010.
These koans describe the behaviour of each, but the process of completing them will mean that you end up with a class that can perform some basic mocking and stubbing of it’s own.
There are about forty steps involved in the koans and, although most steps are pretty straightforward, thirty minutes is going to be quite a challenging time frame to complete them in. So I’d encourage people to pair up or form small teams in order to get to the end.
On the day, I’ll give a quick intro along with Github clone URL and then just mill around to help out with questions that people have. There will also be a brief summing up at the end.
I’m only going to be able to do the session in ‘Ruby flavour’ I’m afraid, as I’m not familiar with the meta programming features of any other languages.
|Session requirements (technical)||Git (including a clone from Github)
Cucumber Ruby Gem
|Video Link #1||http://www.screencast.com/users/njpearman/folders/Jing/media/cb6d31bd-f3cb-4517-bdc0-e6c22ec27319|
|Video Link #2|
|Video Link #3|