2016-03-07 19:52:19 -05:00
|
|
|
# frozen_string_literal: true
|
2018-01-08 15:23:54 -05:00
|
|
|
|
2009-11-16 16:02:16 -05:00
|
|
|
require 'capybara/dsl'
|
|
|
|
|
|
|
|
Capybara.app = Rack::Builder.new do
|
2018-07-10 17:18:39 -04:00
|
|
|
map '/' do
|
2016-08-17 14:41:40 -04:00
|
|
|
run Rails.application
|
2009-11-16 16:02:16 -05:00
|
|
|
end
|
2010-01-01 11:48:39 -05:00
|
|
|
end.to_app
|
2009-11-16 16:02:16 -05:00
|
|
|
|
2016-04-05 12:33:19 -04:00
|
|
|
Capybara.save_path = Rails.root.join('tmp/capybara')
|
2010-02-21 19:59:17 -05:00
|
|
|
|
2012-11-15 08:18:14 -05:00
|
|
|
# Override default rack_test driver to respect data-method attributes.
|
|
|
|
Capybara.register_driver :rack_test do |app|
|
2016-10-04 14:10:29 -04:00
|
|
|
Capybara::RackTest::Driver.new(app, respect_data_method: true)
|
2012-11-15 08:18:14 -05:00
|
|
|
end
|