Skip to content

Commit 8cd7f9f

Browse files
committed
Fixing Capybara issue, handling one deprecation warning
1 parent ff36890 commit 8cd7f9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/rails_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@
7474

7575
Capybara.javascript_driver = driver
7676

77-
Capybara.server do |app, port|
77+
Capybara.register_server(Capybara.javascript_driver) do |app, port|
7878
require "rack/handler/puma"
7979
Rack::Handler::Puma.run(app, Port: port)
8080
end
8181

8282
# Capybara.default_max_wait_time = 15
8383
puts "Capybara using driver: #{Capybara.javascript_driver}"
8484

85-
Capybara.save_path = "#{$APPLICATION_ROOT}/tmp/capybara"
85+
Capybara.save_and_open_page_path = Rails.root.join(*%w( tmp capybara ))
8686
Capybara::Screenshot.prune_strategy = { keep: 10 }
8787

8888
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures

0 commit comments

Comments
 (0)