NWRUG

North West Ruby User Group

A Test Driven Code Challenge

Thursday 20th June 6:30pm at On the Beach offices, Aeroworks

Rake is a Ruby gem we're all probably familiar with, while a lot of it is hidden under the rails command, I'm sure some of us fall back to typing rake ... just through muscle memory because it's a command we've used so often.

One of the lesser known Rake classes is FileList. FileList can take a shell-glob pattern and retrieve all the files in a directory that match that type, such as:

files = Rake::FileList["**/*.yml", "**/*.yaml"]

Essentially, its greater purpose is to create an array with a few helper methods defined to make file manipulation a little easier.

One of the good things about the Rake library is that it's well tested, which brings us onto our challenge. We'll clone a copy of the Rake repo and remove the FileList class, run the tests, see what fails, and try to reimplement the FileList class using only the tests as a guide.

It's a great exercise to do in pairs!

The location

On the Beach offices, Aeroworks 5 Adair St, Manchester, M1 2NQ.

About NWRUG events

Our events are free and open to anyone with an interest in Ruby, regardless of experience level. There is no need to register, just show up on the day! We want to keep NWRUG as welcoming and inclusive as possible so we ask that all attendies follow our Code of conduct. If you have any questions, get in touch.