diff --git a/spec/support/matchers/table_matchers.rb b/spec/support/matchers/table_matchers.rb index d0eb28d641..146002b751 100644 --- a/spec/support/matchers/table_matchers.rb +++ b/spec/support/matchers/table_matchers.rb @@ -19,6 +19,15 @@ RSpec::Matchers.define :have_table_row do |row| end end + failure_message_for_should do |text| + "expected to find table row #{@row}" + end + + failure_message_for_should_not do |text| + "expected not to find table row #{@row}" + end + + def rows_under(node) node.all('tr').map { |tr| tr.all('th, td').map(&:text) } end @@ -31,13 +40,4 @@ RSpec::Matchers.define :have_table_row do |row| true end - - failure_message_for_should do |text| - "expected to find table row #{@row}" - end - - failure_message_for_should_not do |text| - "expected not to find table row #{@row}" - end - end