From 536c1073cb10685805c680d9703e9a92e7f98220 Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Mon, 10 Sep 2018 16:00:12 -0700 Subject: [PATCH] Default plugin settings may be session specific --- lib/capybara/node/pluginify.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/capybara/node/pluginify.rb b/lib/capybara/node/pluginify.rb index 187ebb0a4..13f82820c 100644 --- a/lib/capybara/node/pluginify.rb +++ b/lib/capybara/node/pluginify.rb @@ -6,7 +6,7 @@ module Pluginify def self.prepended(mod) mod.public_instance_methods.each do |method_name| define_method method_name do |*args, **options| - plugin_name = options.delete(:using) { |_using| Capybara.default_plugin[method_name] } + plugin_name = options.delete(:using) { |_using| session_options.default_plugin[method_name] } if plugin_name plugin = Capybara.plugins[plugin_name] raise ArgumentError, "Plugin not loaded: #{plugin_name}" unless plugin