From d4dcd3b1d172c50db24491221468a253b43022db Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Tue, 1 Jul 2014 00:24:12 -0700 Subject: [PATCH] fix Base#dismiss_modal definition --- lib/capybara/driver/base.rb | 2 +- lib/capybara/session.rb | 2 +- lib/capybara/spec/session/accept_alert_spec.rb | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/capybara/driver/base.rb b/lib/capybara/driver/base.rb index 6fc3b4fe..ea9450f9 100644 --- a/lib/capybara/driver/base.rb +++ b/lib/capybara/driver/base.rb @@ -115,7 +115,7 @@ class Capybara::Driver::Base # @return [String] the message shown in the modal # @raise [Capybara::ModalNotFound] if modal dialog hasn't been found # - def dismiss_modal(type, &blk) + def dismiss_modal(type, options={}, &blk) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#dismiss_modal' end diff --git a/lib/capybara/session.rb b/lib/capybara/session.rb index 5dae9cd1..c957415f 100644 --- a/lib/capybara/session.rb +++ b/lib/capybara/session.rb @@ -82,7 +82,7 @@ module Capybara # # This method does not: # - # * accept modal dialogs if they are present + # * accept modal dialogs if they are present (Selenium driver now does, others may not) # * clear browser cache/HTML 5 local storage/IndexedDB/Web SQL database/etc. # * modify state of the driver/underlying browser in any other way # diff --git a/lib/capybara/spec/session/accept_alert_spec.rb b/lib/capybara/spec/session/accept_alert_spec.rb index 8d3451fe..3fe51296 100644 --- a/lib/capybara/spec/session/accept_alert_spec.rb +++ b/lib/capybara/spec/session/accept_alert_spec.rb @@ -23,7 +23,6 @@ Capybara::SpecHelper.spec '#accept_alert', :requires => [:modals] do @session.click_link('Open alert') end end.to raise_error(Capybara::ModalNotFound) - # @session.accept_alert {} # clear the alert so browser continues to function end it "should return the message presented" do