Module: Capybara::Minitest::Assertions

Defined in:
lib/capybara/minitest.rb

Instance Method Summary collapse

Instance Method Details

#assert_buttonObject



# File 'lib/capybara/minitest.rb', line 183

#assert_checked_fieldObject



# File 'lib/capybara/minitest.rb', line 209

#assert_cssObject

see Capybara::Node::Matchers#has_css?



# File 'lib/capybara/minitest.rb', line 157

#assert_current_pathObject



# File 'lib/capybara/minitest.rb', line 32

#assert_fieldObject



# File 'lib/capybara/minitest.rb', line 196



# File 'lib/capybara/minitest.rb', line 170

#assert_matches_selectorObject



# File 'lib/capybara/minitest.rb', line 74

#assert_no_buttonObject



# File 'lib/capybara/minitest.rb', line 189

#assert_no_checked_fieldObject

Assertion that there is no checked_field



# File 'lib/capybara/minitest.rb', line 215

#assert_no_cssObject

see Capybara::Node::Matchers#has_no_css?



# File 'lib/capybara/minitest.rb', line 163

#assert_no_current_pathObject 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_fieldObject



# File 'lib/capybara/minitest.rb', line 202

Assertion that there is no link

see Node::Matchers#has_no_link?



# File 'lib/capybara/minitest.rb', line 176

#assert_no_selectObject



# File 'lib/capybara/minitest.rb', line 239

#assert_no_selectorObject Also known as: refute_selector



# File 'lib/capybara/minitest.rb', line 69

#assert_no_textObject Also known as: refute_text



# File 'lib/capybara/minitest.rb', line 14

#assert_no_titleObject Also known as: refute_title



# File 'lib/capybara/minitest.rb', line 25

#assert_no_unchecked_fieldObject

Assertion that there is no unchecked_field



# File 'lib/capybara/minitest.rb', line 227

#assert_no_xpathObject

see Capybara::Node::Matchers#has_no_xpath?



# File 'lib/capybara/minitest.rb', line 150

#assert_selectObject



# File 'lib/capybara/minitest.rb', line 233

#assert_selectorObject



# File 'lib/capybara/minitest.rb', line 64

#assert_tableObject



# File 'lib/capybara/minitest.rb', line 246

#assert_textObject Also known as: assert_content



# File 'lib/capybara/minitest.rb', line 9

#assert_titleObject



# File 'lib/capybara/minitest.rb', line 19

#assert_unchecked_fieldObject



# File 'lib/capybara/minitest.rb', line 221

#assert_xpathObject

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_buttonObject

Assertion that there is no button



# File 'lib/capybara/minitest.rb', line 189

#refute_checked_fieldObject

Assertion that there is no checked_field



# File 'lib/capybara/minitest.rb', line 215

#refute_cssObject

Assertion that there is no css



# File 'lib/capybara/minitest.rb', line 163

#refute_fieldObject

Assertion that there is no field



# File 'lib/capybara/minitest.rb', line 202

Assertion that there is no link

see Node::Matchers#has_no_link?



# File 'lib/capybara/minitest.rb', line 176

#refute_selectObject

Assertion that there is no select



# File 'lib/capybara/minitest.rb', line 239

#refute_unchecked_fieldObject

Assertion that there is no unchecked_field



# File 'lib/capybara/minitest.rb', line 227

#refute_xpathObject

Assertion that there is no xpath



# File 'lib/capybara/minitest.rb', line 150