Sha256: ad224c296c420c51b685ef5accd0ea987debc84d537152430c0f23a928de6a7f
Contents?: true
Size: 803 Bytes
Versions: 25
Compression:
Stored size: 803 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 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[2].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.name.should == browser.pre(:index, index+1).name p.id.should == browser.pre(:index, index+1).id p.value.should == browser.pre(:index, index+1).value count += 1 end count.should > 0 end end end
Version data entries
25 entries across 25 versions & 1 rubygems