Class: ElabsMatchers::Matchers::HaveTableRow::HaveTableRowMatcher
- Inherits:
-
Struct
- Object
- Struct
- ElabsMatchers::Matchers::HaveTableRow::HaveTableRowMatcher
- Defined in:
- lib/elabs_matchers/matchers/have_table_row.rb
Instance Attribute Summary (collapse)
-
- (Object) page
readonly
Returns the value of attribute page.
-
- (Object) row
Returns the value of attribute row.
-
- (Object) table_name
Returns the value of attribute table_name.
Instance Method Summary (collapse)
- - (Boolean) does_not_match?(page)
- - (Object) failure_message_for_should
- - (Object) failure_message_for_should_not
- - (Boolean) matches?(page)
Instance Attribute Details
- (Object) page (readonly)
Returns the value of attribute page
7 8 9 |
# File 'lib/elabs_matchers/matchers/have_table_row.rb', line 7 def page @page end |
- (Object) row
Returns the value of attribute row
6 7 8 |
# File 'lib/elabs_matchers/matchers/have_table_row.rb', line 6 def row @row end |
- (Object) table_name
Returns the value of attribute table_name
6 7 8 |
# File 'lib/elabs_matchers/matchers/have_table_row.rb', line 6 def table_name @table_name end |
Instance Method Details
- (Boolean) does_not_match?(page)
14 15 16 17 |
# File 'lib/elabs_matchers/matchers/have_table_row.rb', line 14 def does_not_match?(page) @page = page !table or table.has_no_selector?(selector_type, selector) end |
- (Object) failure_message_for_should
19 20 21 |
# File 'lib/elabs_matchers/matchers/have_table_row.rb', line 19 def "Expected #{row.inspect} to be included in the table #{table_name}, but it wasn't:\n\n#{ascii_table}" end |
- (Object) failure_message_for_should_not
23 24 25 |
# File 'lib/elabs_matchers/matchers/have_table_row.rb', line 23 def "Expected there to be no table #{table_name} with row #{row.inspect}, but there was.\n\n#{ascii_table}" end |
- (Boolean) matches?(page)
9 10 11 12 |
# File 'lib/elabs_matchers/matchers/have_table_row.rb', line 9 def matches?(page) @page = page table and table.has_selector?(selector_type, selector) end |