module Capybara::SessionMatchers
def assert_current_path(path, **options, &optional_filter_block)
-
(true)-
Raises:
-
(Capybara::ExpectationNotMet)- if the assertion hasn't succeeded during wait time
Options Hash:
(**options)-
:wait(Numeric) -- Maximum time that Capybara will wait for the current url/path to eq/match given string/regexp argument -
:ignore_query(Boolean) -- Whether the query portion of the current url/path should be ignored -
:url(Boolean) -- Whether the comparison should be done against the full current url or just the path
Parameters:
-
regexp(Regexp) -- The regexp that the current 'path' should match to -
string(String) -- The string that the current 'path' should equal
Overloads:
-
assert_current_path(regexp, **options) -
assert_current_path(string, **options)
def assert_current_path(path, **options, &optional_filter_block) _verify_current_path(path, optional_filter_block, **options) do |query| raise Capybara::ExpectationNotMet, query.failure_message unless query.resolves_for?(self) end end