Module: Spec::Rails::Matchers
- Defined in:
- lib/html_matchers.rb,
lib/matchers/image_matcher.rb,
lib/matchers/table_matcher.rb,
lib/matchers/button_matcher.rb,
lib/matchers/options_matcher.rb,
lib/matchers/td_link_matcher.rb,
lib/matchers/drop_down_matcher.rb,
lib/matchers/span_text_matcher.rb,
lib/matchers/table_body_matcher.rb,
lib/matchers/radio_group_matcher.rb,
lib/matchers/table_header_matcher.rb,
lib/matchers/check_box_group_matcher.rb
Defined Under Namespace
Classes: ButtonMatcher, CheckBoxGroupMatcher, DropDownMatcher, ImageMatcher, OptionsMatcher, RadioGroupMatcher, SpanTextMatcher, TableBodyMatcher, TableHeaderMatcher, TableMatcher, TdLinkMatcher
Instance Method Summary
collapse
Instance Method Details
15
16
17
|
# File 'lib/html_matchers.rb', line 15
def have_button expected
ButtonMatcher.new expected
end
|
#have_check_box_group(target_name, expected) ⇒ Object
19
20
21
|
# File 'lib/html_matchers.rb', line 19
def have_check_box_group target_name, expected
CheckBoxGroupMatcher.new target_name, expected
end
|
#have_dropdown(target_id, expected_options) ⇒ Object
23
24
25
|
# File 'lib/html_matchers.rb', line 23
def have_dropdown target_id, expected_options
DropDownMatcher.new target_id, expected_options
end
|
#have_image(expected_path) ⇒ Object
27
28
29
|
# File 'lib/html_matchers.rb', line 27
def have_image expected_path
ImageMatcher.new expected_path
end
|
#have_options(expected_options) ⇒ Object
31
32
33
|
# File 'lib/html_matchers.rb', line 31
def have_options expected_options
OptionsMatcher.new expected_options
end
|
#have_radio_group(target_name, expected_radio_choices) ⇒ Object
35
36
37
|
# File 'lib/html_matchers.rb', line 35
def have_radio_group target_name, expected_radio_choices
RadioGroupMatcher.new target_name, expected_radio_choices
end
|
#have_span_text(target_id, expected_text) ⇒ Object
39
40
41
|
# File 'lib/html_matchers.rb', line 39
def have_span_text target_id, expected_text
SpanTextMatcher.new target_id, expected_text
end
|
#have_table(table_id_or_expected, expected = nil) ⇒ Object
43
44
45
|
# File 'lib/html_matchers.rb', line 43
def have_table table_id_or_expected, expected = nil
TableMatcher.new table_id_or_expected, expected
end
|
#have_table_body(table_id_or_expected, expected = nil) ⇒ Object
51
52
53
|
# File 'lib/html_matchers.rb', line 51
def have_table_body table_id_or_expected, expected = nil
TableBodyMatcher.new table_id_or_expected, expected
end
|
47
48
49
|
# File 'lib/html_matchers.rb', line 47
def table_id_or_expected, expected = nil
TableHeaderMatcher.new table_id_or_expected, expected
end
|
#have_td_link(target_id, expected_link, expected_text) ⇒ Object
55
56
57
|
# File 'lib/html_matchers.rb', line 55
def have_td_link target_id, expected_link, expected_text
TdLinkMatcher.new target_id, expected_link, expected_text
end
|