Module: Capybara::Minitest::Assertions
- Defined in:
- lib/capybara/minitest.rb
Instance Method Summary collapse
- #assert_button ⇒ Object
- #assert_checked_field ⇒ Object
-
#assert_css ⇒ Object
see Capybara::Node::Matchers#has_css?.
- #assert_current_path ⇒ Object
- #assert_field ⇒ Object
- #assert_link ⇒ Object
- #assert_matches_selector ⇒ Object
- #assert_no_button ⇒ Object
-
#assert_no_checked_field ⇒ Object
Assertion that there is no checked_field.
-
#assert_no_css ⇒ Object
see Capybara::Node::Matchers#has_no_css?.
- #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
see Capybara::Node::Matchers#has_no_xpath?.
- #assert_select ⇒ Object
- #assert_selector ⇒ Object
- #assert_table ⇒ Object
- #assert_text ⇒ Object (also: #assert_content)
- #assert_title ⇒ Object
- #assert_unchecked_field ⇒ Object
-
#assert_xpath ⇒ Object
see Capybara::Node::Matchers#has_xpath?.
-
#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_checked_field ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 209
|
#assert_css ⇒ Object
see Capybara::Node::Matchers#has_css?
|
# File 'lib/capybara/minitest.rb', line 157
|
#assert_current_path ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 32
|
#assert_matches_selector ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 74
|
#assert_no_button ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 189
|
#assert_no_checked_field ⇒ Object
Assertion that there is no checked_field
|
# File 'lib/capybara/minitest.rb', line 215
|
#assert_no_css ⇒ Object
see Capybara::Node::Matchers#has_no_css?
|
# File 'lib/capybara/minitest.rb', line 163
|
#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[assert_text assert_no_text assert_title assert_no_title assert_current_path assert_no_current_path].each do |assertion_name| class_eval <<-ASSERTION, __FILE__, __LINE__ + 1 def #{assertion_name} *args self.assertions +=1 subject, args = determine_subject(args) subject.#{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 202
|
#assert_no_link ⇒ Object
Assertion that there is no link
|
# File 'lib/capybara/minitest.rb', line 176
|
#assert_no_select ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 239
|
#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 227
|
#assert_no_xpath ⇒ Object
see Capybara::Node::Matchers#has_no_xpath?
|
# File 'lib/capybara/minitest.rb', line 150
|
#assert_selector ⇒ Object
|
# File 'lib/capybara/minitest.rb', line 64
|
#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 221
|
#assert_xpath ⇒ Object
see Capybara::Node::Matchers#has_xpath?
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/capybara/minitest.rb', line 84 %w[assert_selector assert_no_selector assert_all_of_selectors assert_none_of_selectors assert_matches_selector assert_not_matches_selector].each do |assertion_name| class_eval <<-ASSERTION, __FILE__, __LINE__ + 1 def #{assertion_name} *args, &optional_filter_block self.assertions +=1 subject, args = determine_subject(args) subject.#{assertion_name}(*args, &optional_filter_block) rescue Capybara::ExpectationNotMet => e raise ::Minitest::Assertion, e.message end ASSERTION end |
#refute_button ⇒ Object
Assertion that there is no button
|
# File 'lib/capybara/minitest.rb', line 189
|
#refute_checked_field ⇒ Object
Assertion that there is no checked_field
|
# File 'lib/capybara/minitest.rb', line 215
|
#refute_css ⇒ Object
Assertion that there is no css
|
# File 'lib/capybara/minitest.rb', line 163
|
#refute_field ⇒ Object
Assertion that there is no field
|
# File 'lib/capybara/minitest.rb', line 202
|
#refute_link ⇒ Object
Assertion that there is no link
|
# File 'lib/capybara/minitest.rb', line 176
|
#refute_select ⇒ Object
Assertion that there is no select
|
# File 'lib/capybara/minitest.rb', line 239
|
#refute_unchecked_field ⇒ Object
Assertion that there is no unchecked_field
|
# File 'lib/capybara/minitest.rb', line 227
|
#refute_xpath ⇒ Object
Assertion that there is no xpath
|
# File 'lib/capybara/minitest.rb', line 150
|