lib/celerity/elements/table.rb in celerity-0.7.9 vs lib/celerity/elements/table.rb in celerity-0.8.0.beta.1

- old
+ new

@@ -19,10 +19,15 @@ ] DEFAULT_HOW = :id def locate super - if @object # cant call assert_exists here, as an exists? method call will fail + if @object + + unless @object.kind_of?(HtmlUnit::Html::HtmlTable) + raise TypeError, "expected HtmlTable, got #{@object.class}" + end + @rows = @object.getRows @cells = [] @rows.each do |row| row.getCells.each do |c| @cells << c \ No newline at end of file