spec/watirspec/table_body_spec.rb in watir-webdriver-0.0.7 vs spec/watirspec/table_body_spec.rb in watir-webdriver-0.0.8

- old
+ new

@@ -20,9 +20,13 @@ browser.table(:index, 0).tbody(:id, /first/).should exist browser.table(:index, 0).tbody(:index, 1).should exist browser.table(:index, 0).tbody(:xpath, "//tbody[@id='first']").should exist end + it "returns the first table body if given no args" do + browser.table.tbody.should exist + end + it "returns false if the table body doesn't exist (page context)" do browser.tbody(:id, 'no_such_id').should_not exist browser.tbody(:id, /no_such_id/).should_not exist browser.tbody(:index, 1337).should_not exist browser.tbody(:xpath, "//tbody[@id='no_such_id']").should_not exist