class Capybara::RSpecMatchers::HaveTitle

Attributes

title[R]

Public Class Methods

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

Public Instance Methods

description() click to toggle source
# File lib/capybara/rspec/matchers.rb, line 99
def description
  "have title #{title.inspect}"
end
does_not_match?(actual) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 86
def does_not_match?(actual)
  @actual = wrap(actual)
  @actual.has_no_title?(title)
end
failure_message_for_should() click to toggle source
# File lib/capybara/rspec/matchers.rb, line 91
def failure_message_for_should
  "expected there to be title #{title.inspect} in #{@actual.title.inspect}"
end
failure_message_for_should_not() click to toggle source
# File lib/capybara/rspec/matchers.rb, line 95
def failure_message_for_should_not
  "expected there not to be title #{title.inspect} in #{@actual.title.inspect}"
end
matches?(actual) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 81
def matches?(actual)
  @actual = wrap(actual)
  @actual.has_title?(title)
end