Module: Capybara::RSpecMatchers

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

Defined Under Namespace

Classes: HaveSelector, HaveText, HaveTitle, Matcher

Instance Method Summary (collapse)

Instance Method Details

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



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

def have_button(locator, options={})
  HaveSelector.new(:button, locator, options)
end

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



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

def have_checked_field(locator, options={})
  HaveSelector.new(:field, locator, options.merge(:checked => true))
end

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



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

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

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



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

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


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

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

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



153
154
155
# File 'lib/capybara/rspec/matchers.rb', line 153

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

- (Object) have_selector(*args)



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

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

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



157
158
159
# File 'lib/capybara/rspec/matchers.rb', line 157

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

- (Object) have_text(*args) Also known as: have_content



124
125
126
# File 'lib/capybara/rspec/matchers.rb', line 124

def have_text(*args)
  HaveText.new(*args)
end

- (Object) have_title(title)



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

def have_title(title)
  HaveTitle.new(title)
end

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



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

def have_unchecked_field(locator, options={})
  HaveSelector.new(:field, locator, options.merge(:unchecked => true))
end

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



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

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