Testing helpers in Ruby on Rails 1.2
Wednesday, February 21st, 2007 by Alexander LangWe are just migrating one of our projects from Rails 1.1.6 to 1.2.2. One of the problems we encountered was, that Recipe 44: Write tests for your helpers from Rails Recipes (by the way Advanced Rails Recipes will come out in Augut 2007) is not working anymore. The line
@controller.send :initialize_current_url
resulted in a
After some messing around, we found out that the following setup method solves this:
Happy testing




