class Capybara::RSpecMatchers::BecomeClosed
def failure_message
def failure_message "expected #{@window.inspect} to become closed after #{@wait_time} seconds" end
def failure_message_when_negated
def failure_message_when_negated "expected #{@window.inspect} not to become closed after #{@wait_time} seconds" end
def initialize(options)
def initialize(options) @options = options end
def matches?(window)
def matches?(window) @window = window @wait_time = Capybara::Queries::BaseQuery.wait(@options, window.session.config.default_max_wait_time) start_time = Capybara::Helpers.monotonic_time while window.exists? return false if (Capybara::Helpers.monotonic_time - start_time) > @wait_time sleep 0.05 end true end