mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Move the RackTest driver override to capybara/rails
This change enables the `:respect_data_method` option from the RackTest driver for Rails projects that don't use RSpec.
This commit is contained in:
parent
6446eac5a3
commit
9c1dd623f1
3 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
|||
# master
|
||||
|
||||
### Changed
|
||||
|
||||
* Move the RackTest driver override with the `:respect_data_method` option
|
||||
enabled from capybara/rspec to capybara/rails, so that it is enabled in
|
||||
Rails projects that don't use RSpec. [Carlos Antonio da Silva]
|
||||
|
||||
# Version 2.0.0
|
||||
|
||||
Release date: 2012-11-05
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'capybara/dsl'
|
|||
Capybara.app = Rack::Builder.new do
|
||||
map "/" do
|
||||
if Rails.version.to_f >= 3.0
|
||||
run Rails.application
|
||||
run Rails.application
|
||||
else # Rails 2
|
||||
use Rails::Rack::Static
|
||||
run ActionController::Dispatcher.new
|
||||
|
@ -15,3 +15,7 @@ end.to_app
|
|||
Capybara.asset_root = Rails.root.join('public')
|
||||
Capybara.save_and_open_page_path = Rails.root.join('tmp/capybara')
|
||||
|
||||
# Override default rack_test driver to respect data-method attributes.
|
||||
Capybara.register_driver :rack_test do |app|
|
||||
Capybara::RackTest::Driver.new(app, :respect_data_method => true)
|
||||
end
|
||||
|
|
|
@ -22,8 +22,3 @@ RSpec.configure do |config|
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Override default rack_test driver to respect data-method attributes.
|
||||
Capybara.register_driver :rack_test do |app|
|
||||
Capybara::RackTest::Driver.new(app, :respect_data_method => true)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue