Asserts that the page has the given path.
Asserts that the page doesn't have the given path.
Checks if the page has the given path.
Checks if the page doesn't have the given path.
Asserts that the page has the given path. By default, if passed a full url this will compare against the full url, if passed a path only the path+query portion will be compared, if passed a regexp the comparison will depend on the :url option (path+query by default)
22 23 24 25 26
# File 'lib/capybara/session/matchers.rb', line 22 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#assert_no_current_path(string, **options) ⇒ true #assert_no_current_path(regexp, **options) ⇒ true
Asserts that the page doesn't have the given path. By default, if passed a full url this will compare against the full url, if passed a path only the path+query portion will be compared, if passed a regexp the comparison will depend on the :url option
38 39 40 41 42
# File 'lib/capybara/session/matchers.rb', line 38 def assert_no_current_path(path, **options, &optional_filter_block) _verify_current_path(path, optional_filter_block, **options) do |query| raise Capybara::ExpectationNotMet, query.negative_failure_message if query.resolves_for?(self) end end#has_current_path?(string, **options) ⇒ Boolean #has_current_path?(regexp, **options) ⇒ Boolean
Checks if the page has the given path. By default, if passed a full url this will compare against the full url, if passed a path only the path+query portion will be compared, if passed a regexp the comparison will depend on the :url option
53 54 55
# File 'lib/capybara/session/matchers.rb', line 53 def has_current_path?(path, **options, &optional_filter_block) make_predicate(options) { assert_current_path(path, **options, &optional_filter_block) } end#has_no_current_path?(string, **options) ⇒ Boolean #has_no_current_path?(regexp, **options) ⇒ Boolean
Checks if the page doesn't have the given path. By default, if passed a full url this will compare against the full url, if passed a path only the path+query portion will be compared, if passed a regexp the comparison will depend on the :url option
66 67 68
# File 'lib/capybara/session/matchers.rb', line 66 def has_no_current_path?(path, **options, &optional_filter_block) make_predicate(options) { assert_no_current_path(path, **options, &optional_filter_block) } end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4