jnicklas/capybara — pull request #868 by carlosantoniodasilva (2012-11-15 13:32:30+00:00)
Title: Move the RackTest driver override to capybara/rails

Pull request #793 merged in 14411d438fc5f0f4c96166ed73abc782f53b34cd enables `:respect_data_method` when requiring `capybara/rspec`, making it work seamlessly with Rails projects that do use RSpec.

However, projects that do not use RSpec will end up only requiring `capybara/rails`, and won't get this functionality.

This change enables the `:respect_data_method` option from the RackTest driver for Rails projects that don't use RSpec, by moving the code that overrides the `:rack_test` driver with the `:respect_data_method` option enabled to `capybara/rails`.

I'm not sure it's required to have this code in both files, since most users will be using this option with Rails projects and probably not with projects that require RSpec only (non-Rails projects). But if you guys think it's necessary to maintain any sort of compatibility I may not be aware of, I can leave it in `capybara/rspec` as well.

Let me know if anything needs improvement, thanks!