Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Standup 10/8/2008 – testing Flash and routing helpers

Ask for Help

One of our clients is looking for high-quality third-party chat services/libraries.

Interesting Things

10.5.5 and screen sharing

The Mac screen sharing application includes a host of interesting power features. Unfortunately, upgrading to Mac 10.5.5 causes these features to go away. Workarounds at this point are to store off the application and re-install it. Or to pay $300 for the official solution. Whichever.

Additional routing-related helper methods

It can be useful to create helper methods designed to extend the routing helpers offered by routes.rb.. power “_path” and “_url” methods. While the easy solution is to define these methods in your view helper layer (the most common client of these methods), a more complete solution is to use a pattern like this:

in routes.rb:

          ActionController::Routing::Routes.draw do |map|
               ... normal routes ...

          ActionController::Routing::Helpers.module_eval do
             def additional_method_name

Any methods added to ActionController::Routing::Helpers will be available in all of the same places that named routes are defined – controllers, views, and ActionController::UrlWriter includers.

Testing Flash in Selenium

Most Flash applications render an inline image in addition to the Flash itself. This image updates as the Flash updates, and appears to be used for caching purposes.

When you’re test-driving, you can make assertions about when this inline image updates to test Flash behavior. The image is binary, so it’s hard to make assertions about exactly what has changed.. but it’s a start.

  1. Joe Moore says:

    Regarding the Flash-generated image: it turns out that [AnyChart]( does this to facilitate printing in Firefox, which does not print Flash very well. [Read all about it here](

  2. Chris Bailey says:

    When adding helper methods to the routes file as described above, I don’t seem to see those methods from an RSpec controller test, but I do see the typical restful resource or named routes helpers. Any ideas?

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *