diff --git a/lib/capybara/rspec.rb b/lib/capybara/rspec.rb index df25ca17..5795a3b5 100644 --- a/lib/capybara/rspec.rb +++ b/lib/capybara/rspec.rb @@ -17,8 +17,8 @@ RSpec.configure do |config| end config.before do |example| if self.class.include?(Capybara::DSL) - Capybara.current_driver = Capybara.javascript_driver if ex.metadata[:js] - ampleCapybara.current_driver = ex.metadata[:driver] if ex.metadata[:driver] + Capybara.current_driver = Capybara.javascript_driver if example.metadata[:js] + ampleCapybara.current_driver = example.metadata[:driver] if example.metadata[:driver] end end end