Sha256: b2ca1fa54e83558ccc97a114345e20c82101f671f2504b328de500d653617766

Contents?: true

Size: 748 Bytes

Versions: 1

Compression:

Stored size: 748 Bytes

Contents

# encoding: utf-8
require File.expand_path('spec_helper', File.dirname(__FILE__))

describe "Dts" do

  before :each do
    browser.goto(WatirSpec.files + "/definition_lists.html")
  end

  describe "#length" do
    it "returns the number of dts" do
      browser.dts.length.should == 11
    end
  end

  describe "#[]" do
    it "returns the dt at the given index" do
      browser.dts[0].id.should == "experience"
    end
  end

  describe "#each" do
    it "iterates through dts correctly" do
      count = 0

      browser.dts.each_with_index do |d, index|
        d.id.should == browser.dt(:index, index).id
        d.class_name.should == browser.dt(:index, index).class_name

		count += 1
      end

      count.should > 0
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watir-webdriver-0.0.7 spec/watirspec/dts_spec.rb