27
07
2009
I had some problems with a view in a Rails app that was conditionally hiding a Google Map that was generated using the YM4R plugin. I don’t usually test views in unit tests, and this logic depended on a particular situation with the data behind the view, so I decided that this would be a good candidate for a Cucumber feature.
Here’s the Cucumber step implementation I wrote.
Read the rest of this entry »
Comments : No Comments »
Categories : Google Maps, ruby on rails, testing
23
07
2009
I’m working on a Rails app that uses the ym4r_gm plugin, getting Google to do the geocoding for Thentic. I liked the idea of stubbing the web service call, because all those calls to an external service add up to over 20 seconds of test suite run time(!). That’s almost half of the 50 second run time of my unit tests (and 50 seconds is much too long for a unit test suite).
I found a good starting point at geokit stubbing for faster tests. I also wanted a way to stub a geocoding failure, and a way to prevent any unit tests from using the real geocoding web service.
Here’s how I did it.
Read the rest of this entry »
Comments : No Comments »
Categories : process, ruby, ruby on rails, servers, testing
30
05
2009
Now that I’ve worked in a team that really was doing XP (except for our Lack Of Onsite Customer shortcoming) I can say that it works pretty well, but only to the extent that you do all of the practices together. Of course, that’s what the XP folks said from the beginning: you can’t just apply 1% of it and make a judgement about it.
Read the rest of this entry »
Comments : No Comments »
Categories : Extreme Programming (XP), agile development, process, ruby on rails
30
05
2009
Extreme Programming Experiences: Introduction
Over the last six months I’ve had the privilege of working in a software development team that was practicing the closest thing to a full implmentation of XP that I’ve ever seen.
Read the rest of this entry »
Comments : No Comments »
Categories : Extreme Programming (XP), agile development, process, ruby on rails
29
11
2008
The new features in Ruby on Rails 2.2.2 have been well documented, and I’m looking forward to using several of them on WhatYouAte.com. If you’re reading this you probably are too.
However, if you’re upgrading an existing project and you’re sticking with official releases (as opposed to edge Rails) like I am, your code probably needs some tweaking to work with Rails 2.2.2. Mine certainly did. Although there were a lot of failed tests with ugly stacktraces, there were only a few API changes in Rails that needed to be accomodated to fix them all. Here’s a list of the changes that broke my app, and what I had to do to get it working again.
Read the rest of this entry »
Comments : 8 Comments »
Categories : Uncategorized, ruby, ruby on rails, testing