class Capybara::RSpecMatchers::BecomeClosed
Public Class Methods
new(options)
click to toggle source
# File lib/capybara/rspec/matchers.rb, line 235 def initialize(options) @options = options end
Public Instance Methods
failure_message()
click to toggle source
# File lib/capybara/rspec/matchers.rb, line 250 def failure_message "expected #{@window.inspect} to become closed after #{@wait_time} seconds" end
failure_message_when_negated()
click to toggle source
# File lib/capybara/rspec/matchers.rb, line 254 def failure_message_when_negated "expected #{@window.inspect} not to become closed after #{@wait_time} seconds" end
matches?(window)
click to toggle source
# File lib/capybara/rspec/matchers.rb, line 239 def matches?(window) @window = window @wait_time = Capybara::Queries::BaseQuery.wait(@options, window.session.config.default_max_wait_time) timer = Capybara::Helpers.timer(expire_in: @wait_time) while window.exists? return false if timer.expired? sleep 0.05 end true end