Module: Capybara::RSpecMatchers

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

Defined Under Namespace

Classes: HaveSelector, HaveText

Instance Method Summary (collapse)

Instance Method Details

- (Object) have_button(locator)



100
101
102
# File 'lib/capybara/rspec/matchers.rb', line 100

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

- (Object) have_checked_field(locator)



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

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

- (Object) have_content(text)



88
89
90
# File 'lib/capybara/rspec/matchers.rb', line 88

def have_content(text)
  HaveText.new(text)
end

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



84
85
86
# File 'lib/capybara/rspec/matchers.rb', line 84

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

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



104
105
106
# File 'lib/capybara/rspec/matchers.rb', line 104

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


96
97
98
# File 'lib/capybara/rspec/matchers.rb', line 96

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

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



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

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

- (Object) have_selector(*args)



76
77
78
# File 'lib/capybara/rspec/matchers.rb', line 76

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

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



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

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

- (Object) have_text(text)



92
93
94
# File 'lib/capybara/rspec/matchers.rb', line 92

def have_text(text)
  HaveText.new(text)
end

- (Object) have_unchecked_field(locator)



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

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

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



80
81
82
# File 'lib/capybara/rspec/matchers.rb', line 80

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