Parent

Class/Module Index [+]

Quicksearch

Capybara::RSpecMatchers::BecomeClosed

Public Class Methods

new(options) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 127
def initialize(options)
  @wait_time = Capybara::Query.new(options).wait
end

Public Instance Methods

failure_message() click to toggle source
# File lib/capybara/rspec/matchers.rb, line 141
def failure_message
  "expected #{@window.inspect} to become closed after #{@wait_time} seconds"
end
Also aliased as: failure_message_for_should
failure_message_for_should() click to toggle source

RSpec 2 compatibility:

Alias for: failure_message
failure_message_for_should_not() click to toggle source
failure_message_when_negated() click to toggle source
# File lib/capybara/rspec/matchers.rb, line 145
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 131
def matches?(window)
  @window = window
  start_time = Time.now
  while window.exists?
    return false if (Time.now - start_time) > @wait_time
    sleep 0.05
  end
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.