Parent

Capybara::RSpecMatchers::HaveSelector

Public Class Methods

new(*args) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 4
def initialize(*args)
  @args = args
end

Public Instance Methods

description() click to toggle source
# File lib/capybara/rspec/matchers.rb, line 16
def description
  "have #{query.description}"
end
does_not_match?(actual) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 12
def does_not_match?(actual)
  wrap(actual).assert_no_selector(*@args)
end
matches?(actual) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 8
def matches?(actual)
  wrap(actual).assert_selector(*@args)
end
query() click to toggle source
# File lib/capybara/rspec/matchers.rb, line 28
def query
  @query ||= Capybara::Query.new(*@args)
end
wrap(actual) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 20
def wrap(actual)
  if actual.respond_to?("has_selector?")
    actual
  else
    Capybara.string(actual.to_s)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.