@@ -48,7 +48,27 @@ module Assertions
4848 # @!method assert_no_current_path
4949 # See {Capybara::SessionMatchers#assert_no_current_path}
5050
51- %w[ text no_text title no_title current_path no_current_path ] . each do |assertion_name |
51+ ##
52+ # Assert all of the provided selectors exist on page
53+ #
54+ # @!method assert_all_of_selectors
55+ # See {Capybara::Node::Matchers#assert_all_of_selectors}
56+
57+ ##
58+ # Assert none of the provided selectors exist on page
59+ #
60+ # @!method assert_none_of_selectors
61+ # See {Capybara::Node::Matchers#assert_none_of_selectors}
62+
63+ ##
64+ # Assert any of the provided selectors exist on page
65+ #
66+ # @!method assert_any_of_selectors
67+ # See {Capybara::Node::Matchers#assert_any_of_selectors}
68+
69+
70+ %w[ text no_text title no_title current_path no_current_path
71+ all_of_selectors none_of_selectors any_of_selectors ] . each do |assertion_name |
5272 class_eval <<-ASSERTION , __FILE__ , __LINE__ + 1
5373 def assert_#{ assertion_name } (*args, **kwargs, &optional_filter_block)
5474 self.assertions +=1
@@ -93,24 +113,6 @@ def assert_#{assertion_name}(*args, **kwargs, &optional_filter_block)
93113 # @!method assert_not_matches_selector
94114 # See {Capybara::Node::Matchers#assert_not_matches_selector}
95115
96- ##
97- # Assert all of the provided selectors exist on page
98- #
99- # @!method assert_all_of_selectors
100- # See {Capybara::Node::Matchers#assert_all_of_selectors}
101-
102- ##
103- # Assert none of the provided selectors exist on page
104- #
105- # @!method assert_none_of_selectors
106- # See {Capybara::Node::Matchers#assert_none_of_selectors}
107-
108- ##
109- # Assert any of the provided selectors exist on page
110- #
111- # @!method assert_any_of_selectors
112- # See {Capybara::Node::Matchers#assert_any_of_selectors}
113-
114116 ##
115117 # Assert element has the provided CSS styles
116118 #
@@ -144,7 +146,6 @@ def assert_#{assertion_name}(*args, **kwargs, &optional_filter_block)
144146 # See {Capybara::Node::Matchers#assert_no_ancestor}
145147
146148 %w[ selector no_selector matches_style
147- all_of_selectors none_of_selectors any_of_selectors
148149 matches_selector not_matches_selector
149150 sibling no_sibling ancestor no_ancestor ] . each do |assertion_name |
150151 class_eval <<-ASSERTION , __FILE__ , __LINE__ + 1
0 commit comments