class Capybara::RSpecMatchers::HaveCurrentPath

Attributes

current_path[R]
failure_message[R]
failure_message_for_should[R]
failure_message_for_should_not[R]
failure_message_when_negated[R]

Public Class Methods

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

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

Public Instance Methods

description() click to toggle source
# File lib/capybara/rspec/matchers.rb, line 153
def description
  "have current path #{current_path.inspect}"
end
does_not_match?(actual) click to toggle source
# File lib/capybara/rspec/matchers.rb, line 146
def does_not_match?(actual)
  wrap(actual).assert_no_current_path(*@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 139
def matches?(actual)
  wrap(actual).assert_current_path(*@args)
rescue Capybara::ExpectationNotMet => e
  @failure_message = e.message
  return false
end