Test case for a Rails bug