Sha256: ea55690888a8af09a19f9b792441b9f87c51cdf21fc4501f1507025cb964d9ae

Contents?: true

Size: 828 Bytes

Versions: 1

Compression:

Stored size: 828 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'

describe "Lis" do

  before :all do
    @browser = Browser.new(BROWSER_OPTIONS)
  end

  before :each do
    @browser.goto(HTML_DIR + "/non_control_elements.html")
  end

  describe "#length" do
    it "returns the number of lis" do
      @browser.lis.length.should == 18
    end
  end

  describe "#[]" do
    it "returns the p at the given index" do
      @browser.lis[5].id.should == "non_link_1"
    end
  end

  describe "#each" do
    it "iterates through lis correctly" do
      @browser.lis.each_with_index do |l, index|
        l.name.should == @browser.li(:index, index+1).name
        l.id.should == @browser.li(:index, index+1).id
        l.value.should == @browser.li(:index, index+1).value
      end
    end
  end

  after :all do
    @browser.close
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caius-celerity-0.0.6.11 spec/lis_spec.rb