Module: Capybara::RSpecMatchers
- Defined in:
- lib/capybara/rspec/matchers.rb
Defined Under Namespace
Classes: BecomeClosed, HaveCurrentPath, HaveSelector, HaveText, HaveTitle, Matcher
Instance Method Summary
collapse
-
#become_closed(options = {}) ⇒ Object
Wait for window to become closed.
-
#have_button(locator, options = {}) ⇒ Object
-
#have_checked_field(locator, options = {}) ⇒ Object
-
#have_css(css, options = {}) ⇒ Object
-
#have_current_path(path, options = {}) ⇒ Object
-
#have_field(locator, options = {}) ⇒ Object
-
#have_link(locator, options = {}) ⇒ Object
-
#have_select(locator, options = {}) ⇒ Object
-
#have_selector(*args) ⇒ Object
-
#have_table(locator, options = {}) ⇒ Object
-
#have_text(*args) ⇒ Object
(also: #have_content)
-
#have_title(title, options = {}) ⇒ Object
-
#have_unchecked_field(locator, options = {}) ⇒ Object
-
#have_xpath(xpath, options = {}) ⇒ Object
Instance Method Details
#become_closed(options = {}) ⇒ Object
Wait for window to become closed.
248
249
250
|
# File 'lib/capybara/rspec/matchers.rb', line 248
def become_closed(options = {})
BecomeClosed.new(options)
end
|
218
219
220
|
# File 'lib/capybara/rspec/matchers.rb', line 218
def have_button(locator, options={})
HaveSelector.new(:button, locator, options)
end
|
#have_checked_field(locator, options = {}) ⇒ Object
226
227
228
|
# File 'lib/capybara/rspec/matchers.rb', line 226
def have_checked_field(locator, options={})
HaveSelector.new(:field, locator, options.merge(:checked => true))
end
|
#have_css(css, options = {}) ⇒ Object
197
198
199
|
# File 'lib/capybara/rspec/matchers.rb', line 197
def have_css(css, options={})
HaveSelector.new(:css, css, options)
end
|
#have_current_path(path, options = {}) ⇒ Object
210
211
212
|
# File 'lib/capybara/rspec/matchers.rb', line 210
def have_current_path(path, options = {})
HaveCurrentPath.new(path, options)
end
|
#have_field(locator, options = {}) ⇒ Object
222
223
224
|
# File 'lib/capybara/rspec/matchers.rb', line 222
def have_field(locator, options={})
HaveSelector.new(:field, locator, options)
end
|
#have_link(locator, options = {}) ⇒ Object
214
215
216
|
# File 'lib/capybara/rspec/matchers.rb', line 214
def have_link(locator, options={})
HaveSelector.new(:link, locator, options)
end
|
#have_select(locator, options = {}) ⇒ Object
234
235
236
|
# File 'lib/capybara/rspec/matchers.rb', line 234
def have_select(locator, options={})
HaveSelector.new(:select, locator, options)
end
|
#have_selector(*args) ⇒ Object
189
190
191
|
# File 'lib/capybara/rspec/matchers.rb', line 189
def have_selector(*args)
HaveSelector.new(*args)
end
|
#have_table(locator, options = {}) ⇒ Object
238
239
240
|
# File 'lib/capybara/rspec/matchers.rb', line 238
def have_table(locator, options={})
HaveSelector.new(:table, locator, options)
end
|
#have_text(*args) ⇒ Object
Also known as:
have_content
201
202
203
|
# File 'lib/capybara/rspec/matchers.rb', line 201
def have_text(*args)
HaveText.new(*args)
end
|
#have_title(title, options = {}) ⇒ Object
206
207
208
|
# File 'lib/capybara/rspec/matchers.rb', line 206
def have_title(title, options = {})
HaveTitle.new(title, options)
end
|
#have_unchecked_field(locator, options = {}) ⇒ Object
230
231
232
|
# File 'lib/capybara/rspec/matchers.rb', line 230
def have_unchecked_field(locator, options={})
HaveSelector.new(:field, locator, options.merge(:unchecked => true))
end
|
#have_xpath(xpath, options = {}) ⇒ Object
193
194
195
|
# File 'lib/capybara/rspec/matchers.rb', line 193
def have_xpath(xpath, options={})
HaveSelector.new(:xpath, xpath, options)
end
|