Module: Capybara::RSpecMatchers

Defined in:
lib/capybara/rspec/matchers.rb

Defined Under Namespace

Classes: HaveMatcher, HaveSelector

Instance Method Summary (collapse)

Instance Method Details

- (Object) have_button(locator)



130
131
132
# File 'lib/capybara/rspec/matchers.rb', line 130

def have_button(locator)
  HaveMatcher.new(:button, locator)
end

- (Object) have_checked_field(locator)



138
139
140
# File 'lib/capybara/rspec/matchers.rb', line 138

def have_checked_field(locator)
  HaveMatcher.new(:checked_field, locator)
end

- (Object) have_content(text)



120
121
122
123
124
# File 'lib/capybara/rspec/matchers.rb', line 120

def have_content(text)
  HaveMatcher.new(:content, text.to_s) do |page, matcher|
    %(expected there to be content #{matcher.locator.inspect} in #{page.text.inspect})
  end
end

- (Object) have_css(css, options = {})



116
117
118
# File 'lib/capybara/rspec/matchers.rb', line 116

def have_css(css, options={})
  HaveMatcher.new(:css, css, options)
end

- (Object) have_field(locator, options = {})



134
135
136
# File 'lib/capybara/rspec/matchers.rb', line 134

def have_field(locator, options={})
  HaveMatcher.new(:field, locator, options)
end


126
127
128
# File 'lib/capybara/rspec/matchers.rb', line 126

def have_link(locator, options={})
  HaveMatcher.new(:link, locator, options)
end

- (Object) have_select(locator, options = {})



146
147
148
# File 'lib/capybara/rspec/matchers.rb', line 146

def have_select(locator, options={})
  HaveMatcher.new(:select, locator, options)
end

- (Object) have_selector(*args)



108
109
110
# File 'lib/capybara/rspec/matchers.rb', line 108

def have_selector(*args)
  HaveSelector.new(*args)
end

- (Object) have_table(locator, options = {})



150
151
152
# File 'lib/capybara/rspec/matchers.rb', line 150

def have_table(locator, options={})
  HaveMatcher.new(:table, locator, options)
end

- (Object) have_unchecked_field(locator)



142
143
144
# File 'lib/capybara/rspec/matchers.rb', line 142

def have_unchecked_field(locator)
  HaveMatcher.new(:unchecked_field, locator)
end

- (Object) have_xpath(xpath, options = {})



112
113
114
# File 'lib/capybara/rspec/matchers.rb', line 112

def have_xpath(xpath, options={})
  HaveMatcher.new(:xpath, xpath, options)
end