Module: RSpec::TagMatchers
- Defined in:
- lib/rspec/tag_matchers.rb,
lib/rspec/tag_matchers/has_tag.rb,
lib/rspec/tag_matchers/has_form.rb,
lib/rspec/tag_matchers/has_input.rb,
lib/rspec/tag_matchers/has_select.rb,
lib/rspec/tag_matchers/has_checkbox.rb,
lib/rspec/tag_matchers/has_date_select.rb,
lib/rspec/tag_matchers/has_time_select.rb,
lib/rspec/tag_matchers/multiple_input_matcher.rb
Defined Under Namespace
Modules: Helpers Classes: HasCheckbox, HasDateSelect, HasForm, HasInput, HasSelect, HasTag, HasTimeSelect, MultipleInputMatcher
Instance Method Summary collapse
-
#have_checkbox ⇒ HasCheckbox
Matches
<input type="checkbox">
tags in HTML. -
#have_date_select ⇒ HasDateSelect
Matches inputs generated by Rails’
date_select
helper. -
#have_form ⇒ HasForm
Matches
<form>
tags in HTML. -
#have_input ⇒ HasInput
Matches
<input>
tags in HTML. -
#have_select ⇒ HasSelect
Matches
<select>
tags in HTML. -
#have_tag(name) ⇒ HasTag
Matches HTML tags by name.
-
#have_time_select ⇒ HasTimeSelect
Matches inputs generated by Rails’
time_select
helper.
Instance Method Details
#have_checkbox ⇒ HasCheckbox
Matches <input type="checkbox">
tags in HTML.
20 21 22 |
# File 'lib/rspec/tag_matchers/has_checkbox.rb', line 20 def have_checkbox HasCheckbox.new end |
#have_date_select ⇒ HasDateSelect
Matches inputs generated by Rails’ date_select
helper.
21 22 23 |
# File 'lib/rspec/tag_matchers/has_date_select.rb', line 21 def have_date_select HasDateSelect.new end |
#have_form ⇒ HasForm
Matches <form>
tags in HTML.
20 21 22 |
# File 'lib/rspec/tag_matchers/has_form.rb', line 20 def have_form HasForm.new end |
#have_input ⇒ HasInput
Matches <input>
tags in HTML.
22 23 24 |
# File 'lib/rspec/tag_matchers/has_input.rb', line 22 def have_input HasInput.new end |
#have_select ⇒ HasSelect
Matches <select>
tags in HTML.
8 9 10 |
# File 'lib/rspec/tag_matchers/has_select.rb', line 8 def have_select HasSelect.new end |
#have_tag(name) ⇒ HasTag
Matches HTML tags by name.
34 35 36 |
# File 'lib/rspec/tag_matchers/has_tag.rb', line 34 def have_tag(name) HasTag.new(name) end |
#have_time_select ⇒ HasTimeSelect
Matches inputs generated by Rails’ time_select
helper.
10 11 12 |
# File 'lib/rspec/tag_matchers/has_time_select.rb', line 10 def have_time_select HasTimeSelect.new end |