Last night The Frontier Group descended on the Western Australian component of the Australian Web Awards for a night of fun, drinks and a chance to recognise the outstanding work that the WA Web Industry produces every year. The quality of work seen was fantastic and we’re looking forward to the national awards at Web Directions later this month.
The Frontier Group managed to take home the Innovation award for the GOT APP website. GOT APP is a mobile application for finding the best venue for your night out or weekend, it shows you nearby bars and helps you find out when each bar is going to get busy.
I love the RSpec let syntax. I especially love using let blocks to declare everything on the planet. However, I was noticing a lot of duplication in my code so I knocked up the below pattern to deal with the issue:
The pattern I’m referring to above is declaring and using the vehicle_attributes object to set attributes on an object. The benefits of this pattern is that I’m able to set specific attributes on an object on a per-context basis without having to re-write my call to the factory. The issue that caused me to start using this pattern was having a declaration at the top of the file that was getting overloaded with ‘common’ attributes. My vehicle declaration started to look like: