module Capybara::SessionMatchers
def assert_current_path(path, **options)
-
(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 compare 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) _verify_current_path(path, options) { |query| raise Capybara::ExpectationNotMet, query.failure_message unless query.resolves_for?(self) } end