Module: Capybara::Minitest::Assertions
- Defined in:
- lib/capybara/minitest.rb
Instance Method Summary collapse
- #assert_ancestor ⇒ Object
- #assert_button ⇒ Object
- #assert_checked_field ⇒ Object
- #assert_css ⇒ Object
- #assert_current_path ⇒ Object
- #assert_field ⇒ Object
- #assert_link ⇒ Object
- #assert_matches_selector ⇒ Object
- #assert_matches_style ⇒ Object
- #assert_no_button ⇒ Object
-
#assert_no_checked_field ⇒ Object
Assertion that there is no checked_field.
- #assert_no_css ⇒ Object
- #assert_no_current_path ⇒ Object (also: #refute_current_path)
- #assert_no_field ⇒ Object
-
#assert_no_link ⇒ Object
Assertion that there is no link.
- #assert_no_select ⇒ Object
- #assert_no_selector ⇒ Object (also: #refute_selector)
- #assert_no_text ⇒ Object (also: #refute_text)
- #assert_no_title ⇒ Object (also: #refute_title)
-
#assert_no_unchecked_field ⇒ Object
Assertion that there is no unchecked_field.
- #assert_no_xpath ⇒ Object
- #assert_select ⇒ Object
- #assert_selector ⇒ Object
- #assert_sibling ⇒ Object
- #assert_table ⇒ Object
- #assert_text ⇒ Object (also: #assert_content)
- #assert_title ⇒ Object
- #assert_unchecked_field ⇒ Object
- #assert_xpath ⇒ Object
-
#refute_button ⇒ Object
Assertion that there is no button.
-
#refute_checked_field ⇒ Object
Assertion that there is no checked_field.
-
#refute_css ⇒ Object
Assertion that there is no css.
-
#refute_field ⇒ Object
Assertion that there is no field.
-
#refute_link ⇒ Object
Assertion that there is no link.
-
#refute_select ⇒ Object
Assertion that there is no select.
-
#refute_unchecked_field ⇒ Object
Assertion that there is no unchecked_field.
-
#refute_xpath ⇒ Object
Assertion that there is no xpath.
Instance Method Details
#assert_ancestor ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/capybara/minitest.rb', line 99 %w[selector no_selector matches_style all_of_selectors none_of_selectors any_of_selectors matches_selector not_matches_selector sibling no_sibling ancestor no_ancestor].each do |assertion_name| class_eval <<-ASSERTION, __FILE__, __LINE__ + 1 def assert_#{assertion_name} *args, &optional_filter_block self.assertions +=1 subject, args = determine_subject(args) subject.assert_#{assertion_name}(*args, &optional_filter_block) rescue Capybara::ExpectationNotMet => e raise ::Minitest::Assertion, e.message end ASSERTION end |
#assert_checked_field ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 227
|
#assert_current_path ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 32
|
#assert_matches_selector ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 74
|
#assert_matches_style ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 84
|
#assert_no_button ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 207
|
#assert_no_checked_field ⇒ Object
Assertion that there is no checked_field
|
# File 'lib/capybara/minitest.rb', line 233
|
#assert_no_current_path ⇒ Object Also known as: refute_current_path
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/capybara/minitest.rb', line 45 %w[text no_text title no_title current_path no_current_path].each do |assertion_name| class_eval <<-ASSERTION, __FILE__, __LINE__ + 1 def assert_#{assertion_name} *args self.assertions +=1 subject, args = determine_subject(args) subject.assert_#{assertion_name}(*args) rescue Capybara::ExpectationNotMet => e raise ::Minitest::Assertion, e.message end ASSERTION end |
#assert_no_field ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 220
|
#assert_no_link ⇒ Object
Assertion that there is no link
|
# File 'lib/capybara/minitest.rb', line 194
|
#assert_no_select ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 257
|
#assert_no_selector ⇒ Object Also known as: refute_selector
|
# File 'lib/capybara/minitest.rb', line 69
|
#assert_no_text ⇒ Object Also known as: refute_text
|
# File 'lib/capybara/minitest.rb', line 14
|
#assert_no_title ⇒ Object Also known as: refute_title
|
# File 'lib/capybara/minitest.rb', line 25
|
#assert_no_unchecked_field ⇒ Object
Assertion that there is no unchecked_field
|
# File 'lib/capybara/minitest.rb', line 245
|
#assert_no_xpath ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 168
|
#assert_selector ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 64
|
#assert_sibling ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 89
|
#assert_text ⇒ Object Also known as: assert_content
|
# File 'lib/capybara/minitest.rb', line 9
|
#assert_title ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 19
|
#assert_unchecked_field ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 239
|
#refute_button ⇒ Object
Assertion that there is no button
|
# File 'lib/capybara/minitest.rb', line 207
|
#refute_checked_field ⇒ Object
Assertion that there is no checked_field
|
# File 'lib/capybara/minitest.rb', line 233
|
#refute_css ⇒ Object
Assertion that there is no css
|
# File 'lib/capybara/minitest.rb', line 181
|
#refute_field ⇒ Object
Assertion that there is no field
|
# File 'lib/capybara/minitest.rb', line 220
|
#refute_link ⇒ Object
Assertion that there is no link
|
# File 'lib/capybara/minitest.rb', line 194
|
#refute_select ⇒ Object
Assertion that there is no select
|
# File 'lib/capybara/minitest.rb', line 257
|
#refute_unchecked_field ⇒ Object
Assertion that there is no unchecked_field
|
# File 'lib/capybara/minitest.rb', line 245
|
#refute_xpath ⇒ Object
Assertion that there is no xpath
|
# File 'lib/capybara/minitest.rb', line 168
|