Sha256: 72b64ceab756f4b1e31b01caf0c66a956bda28b2e5a7c80152b8e5f534602cbe
Contents?: true
Size: 999 Bytes
Versions: 3
Compression:
Stored size: 999 Bytes
Contents
# encoding: utf-8 require File.expand_path("../spec_helper", __FILE__) describe "Pres" do before :each do browser.goto(WatirSpec.files + "/non_control_elements.html") end bug "http://github.com/jarib/celerity/issues#issue/25", :celerity do describe "with selectors" do it "returns the matching elements" do browser.pres(:class => "c++").to_a.should == [browser.pre(:class => "c++")] end end end describe "#length" do it "returns the number of pres" do browser.pres.length.should == 7 end end describe "#[]" do it "returns the pre at the given index" do browser.pres[1].id.should == "rspec" end end describe "#each" do it "iterates through pres correctly" do count = 0 browser.pres.each_with_index do |p, index| p.id.should == browser.pre(:index, index).id p.value.should == browser.pre(:index, index).value count += 1 end count.should > 0 end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
watir-webdriver-0.1.4 | spec/watirspec/pres_spec.rb |
watir-webdriver-0.1.3 | spec/watirspec/pres_spec.rb |
watir-webdriver-0.1.2 | spec/watirspec/pres_spec.rb |