Sean Beckett's blog
Standup 08/08/2008
Interesting Things
- When using time zones in Rails 2.1, if you specify a zone, any datetime ActiveRecord attributes will be returned in that zone. E.g. if you specify Eastern Time, and then later request changed_at from an ActiveRecord, it will be returned in ET. However, if you ask for
Time.nowit is always returned in the local time zone, regardless of TZ settings. This isn't necessarily bad or unexpected behavior, but it can lead to test failures if you save a time to an ActiveRecord, get it back, and then compare the values. One workaround is to useTime.zone.now, which will always respect the current time zone, although this doesn't help with large existing codebases.
Ask for Help
"We're FlexMock for some of our Test::Unit unit tests, and recently added some new tests; nothing that is exercising new parts of the code or creating new mocks. However, for some reason when we call previously existing mocks we get errors from Rspec. These are not exceptions or assertion failures, but full-stop errors as if there were a syntax error. Turns out Rspec reopens the Test::Unit::TestCase class and overwrites some behavior, although the cause of the errors remain entirely unclear. Anyone know why it would do that and how to prevent it in the future?"
A few people mumbled about Rspec magic, but actual help was not immediately forthcoming.
Standup 08/06/2008
Interesting Things
- If you're having problems with JSUnit not loading in Firefox 3, load the about:config settings and search for 'origin'. You'll want to change the
security.fileuri.strict_origin_policyvalue from 'true' to 'false'. JSUnit should now initialize properly, although you still won't see a Browse button.
Standup 08/04/2008
Ask for Help
"Does anyone know why a Selenium click event might not trigger the same activity as directly triggering the DOM id through javascript? We have a form submit button that works fine when directly activated but doesn't work in Selenium."
It was suggested that perhaps this is a timing issue. Maybe some required JS for the form hasn't loaded before Selenium is trying the event.
One workaround would be to test only the form submission called by on-click instead of the click itself.
Standup 07/16/2008
Interesting Things
- It's always a good idea to test your backup and recovery strategy, but while doing so one team of Pivots found that restoring MySQL was more painful than they had expected. Restoring the backup to the master database and then replaying the binary logs to the right point but no further took a lot of manual attention and time. Is there a utility to ease the pain of restoring MySQL from backup?
Standup 07/15/2008
Interesting Things
- If using Desert and Rails 2.1, if the first view loaded is from a plugin things blow up.
Ask for Help
"How can I make follow_redirect go to a URL?"
When using a follow_redirect to a URL instead of a hash, the test fails with a string conversion exception. No solutions were forthcoming.
Standup 07/14/2008
Interesting Things
- Congratulations to Engine Yard on closing $15M Series B financing!
- After a catastrophic HDD failure, one Pivot found 1password on his iPhone to be invaluable in restoring all his login credentials.







