I don't agree with Capybara's rack_test driver knowing anything about Rails 3. Kalv's written about it and I've raised an issue against Capybara.
I've created this as a kinda failing test to expose one side of the problem. Rack does not equal Rails 3 yet Capybara's rack_test driver does 'clever' things with some arbitrary data-* attributes that Rails 3 emits.