Painless Javascript testing for Rails 3.1+