spec/cucumber/ast/table_spec.rb in cucumber-1.1.9 vs spec/cucumber/ast/table_spec.rb in cucumber-1.2.0
- old
+ new
@@ -472,9 +472,18 @@
| c | d | y |
}, __FILE__, __LINE__)
lambda { @t.dup.diff!(t) }.should_not raise_error
lambda { @t.dup.diff!(t, :surplus_col => true) }.should raise_error
end
+
+ it "should not raise on misplaced columns" do
+ t = table(%{
+ | b | a |
+ | d | c |
+ }, __FILE__, __LINE__)
+ lambda { @t.dup.diff!(t) }.should_not raise_error
+ lambda { @t.dup.diff!(t, :misplaced_col => true) }.should raise_error
+ end
end
def table(text, file, offset)
Table.parse(text, file, offset)
end