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