Sha256: 88830a4fe002bea8757d649f52690ba2f32685874bfb4e58a5262500da50c497

Contents?: true

Size: 805 Bytes

Versions: 25

Compression:

Stored size: 805 Bytes

Contents

# encoding: utf-8
require File.expand_path("../spec_helper", __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[1].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.name.should == browser.dt(:index, index+1).name
        d.id.should == browser.dt(:index, index+1).id
        d.class_name.should == browser.dt(:index, index+1).class_name

        count += 1
      end

      count.should > 0
    end
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
operawatir-0.7.pre4-jruby spec/watir2/dts_spec.rb
operawatir-0.7.pre3-jruby spec/watir2/dts_spec.rb
operawatir-0.7.pre2-jruby spec/watir2/dts_spec.rb
operawatir-0.7.pre1-jruby spec/watir2/dts_spec.rb
operawatir-0.6.pre1-jruby spec/watir2/dts_spec.rb
operawatir-0.5.1-jruby spec/watir2/dts_spec.rb
operawatir-0.5-jruby spec/watir2/dts_spec.rb
operawatir-0.5.pre3-jruby spec/watir2/dts_spec.rb
operawatir-0.5.pre2-jruby spec/watir2/dts_spec.rb
operawatir-0.5.pre1-jruby spec/watir2/dts_spec.rb
operawatir-0.4.3.pre1-jruby spec/watir2/dts_spec.rb
operawatir-0.4.2-jruby spec/watir2/dts_spec.rb
operawatir-0.4.1-jruby spec/watir2/dts_spec.rb
operawatir-0.4.1.pre7-jruby spec/watir2/dts_spec.rb
operawatir-0.4.1.pre6-jruby spec/watir2/dts_spec.rb
operawatir-0.4.1.pre5-jruby spec/watir2/dts_spec.rb
operawatir-0.4.1.pre4-jruby spec/watir2/dts_spec.rb
operawatir-0.4.1.pre3-jruby spec/watir2/dts_spec.rb
operawatir-0.4.1.pre2-jruby spec/watir2/dts_spec.rb
operawatir-0.4.1.pre1-jruby spec/watir2/dts_spec.rb