class Capybara::RSpecMatchers::HaveTitle

Attributes

failure_message[R]
failure_message_for_should[R]
failure_message_for_should_not[R]
failure_message_when_negated[R]
title[R]

Public Class Methods

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

  # are set just for backwards compatability
  @title = args.first
end

Public Instance Methods

description() click to toggle source
# File lib/capybara/rspec/matchers.rb, line 118
def description
  "have title #{title.inspect}"
end
does_not_match?(actual) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 111
def does_not_match?(actual)
  wrap(actual).assert_no_title(*@args)
rescue Capybara::ExpectationNotMet => e
  @failure_message_when_negated = e.message
  return false
end
matches?(actual) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 104
def matches?(actual)
  wrap(actual).assert_title(*@args)
rescue Capybara::ExpectationNotMet => e
  @failure_message = e.message
  return false
end