Michael MacDonald

Archive for September, 2009|Monthly archive page

Variables, Scope and Iterators

In Ruby on September 30, 2009 at 8:00 am

When I first starting using Ruby I used the for loop to iterate over arrays. A colleague recommended I use the each iterator instead. Why? Check this out… Read the rest of this entry »

Advertisements

Look Ma, No Notes

In Business on September 23, 2009 at 8:00 am

Here’s a challenge for you… don’t take a pen or paper to your next meeting! Just focus on paying attention instead. Read the rest of this entry »

Push Back, Say No

In Business on September 9, 2009 at 8:00 am

I know it’s hard to say it but you can do it. You’re a smart cookie. Let’s try it together…

NO!

Good. That was easy. Let’s try a real example…

Sorry for the late notice but can you drop everything and implement this new whizz-bang feature by the end of the day?

YES!

What?! Read the rest of this entry »

Testing Sphinx with Cucumber

In Rails, Testing on September 2, 2009 at 8:00 am

For awhile, all of my Cucumber features that involved search were marked as TODO. The search worked but I had no integration tests for it because the default setup of Cucumber uses the transactional fixtures setting to run each scenario inside of a transaction to ensure that the database starts in the same known state for each scenario. Unfortunately ThinkSphinx won’t work with this setup. Thankfully, Brandon from opensoul.org wrote up a great post on how to modify your Cucumber setup to get it working.

Further to Brandon’s post, here’s how I’ve incorporated running search features with Cucumber… Read the rest of this entry »