Sha256: 6465767fff9b994ca345c8ada4c62de11bd3a5aa1edc408ca43b7a5340f5e575
Contents?: true
Size: 1.5 KB
Versions: 1
Compression:
Stored size: 1.5 KB
Contents
require File.dirname(__FILE__) + '/spec_helper.rb' describe "TableHeaders" do before :all do @browser = Browser.new end before :each do @browser = Browser.new @browser.goto(TEST_HOST + "/tables.html") end describe "#length" do it "should return the correct number of table theads (page context)" do @browser.theads.length.should == 1 end it "should return the correct number of table theads (table context)" do @browser.table(:index, 1).theads.length.should == 1 end end describe "#[]" do it "should return the row at the given index (page context)" do @browser.theads[1].id.should == "tax_headers" end it "should return the row at the given index (table context)" do @browser.table(:index, 1).theads[1].id.should == "tax_headers" end end describe "#each" do it "should iterate through table theads correctly (page context)" do @browser.theads.each_with_index do |thead, index| thead.name.should == @browser.thead(:index, index+1).name thead.id.should == @browser.thead(:index, index+1).id end end it "should iterate through table theads correctly (table context)" do table = @browser.table(:index, 1) table.theads.each_with_index do |thead, index| thead.name.should == table.thead(:index, index+1).name thead.id.should == table.thead(:index, index+1).id end end end after :all do @browser.close end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
celerity-0.0.4 | spec/table_headers_spec.rb |