spec/watir_table_spec.rb in watirspec-0.1.2 vs spec/watir_table_spec.rb in watirspec-0.1.3

- old
+ new

@@ -12,50 +12,59 @@ expected_table = [ %w[1 2 3], %w[4 5 6], %w[7 8 9] ] - table(:id => "normal").to_a.should =~ expected_table + table(:id => "normal").to_a.should match_array(expected_table) end it "#to_a works with table with headers" do expected_table = [ %w[1 2 3 4], %w[5 6 7 8], %w[9 10 11 12], ] - table(:id => "headers").to_a.should =~ expected_table + table(:id => "headers").to_a.should match_array(expected_table) end it "#to_a works with nested tables" do expected_table = [ %w[1 2], [[%w[11 12], %w[13 14]], "3"] ] - table(:id => "nested").to_a.should =~ expected_table + table(:id => "nested").to_a.should match_array(expected_table) end + it "#to_a works with nested table with non-direct child" do + expected_table = [ + %w[1 2], + [[%w[11 12], %w[13 14]], "3"] + ] + + table(:id => "nestednondirectchild").to_a.should match_array(expected_table) + end + it "#to_a works with deep-nested tables" do expected_table = [ %w[1 2], [[%w[11 12], [[["404", "405"], ["406", "407"]], "14"]], "3"] ] - table(:id => "deepnested").to_a.should =~ expected_table + table(:id => "deepnested").to_a.should match_array(expected_table) end it "#to_a works with colspan" do expected_table = [ %w[1 2], ["3"] ] - table(:id => "colspan").to_a.should =~ expected_table + table(:id => "colspan").to_a.should match_array(expected_table) end it "#to_a works with rowspan" do expected_table = [ %w[1 2], %w[3 4], %w[5] ] - table(:id => "rowspan").to_a.should =~ expected_table + table(:id => "rowspan").to_a.should match_array(expected_table) end end \ No newline at end of file