Sha256: e0517d2914de513eef68f5c36e8ff5c7c4bd674d1bdcddfbc5e11c8a653a0a2d

Contents?: true

Size: 869 Bytes

Versions: 1

Compression:

Stored size: 869 Bytes

Contents

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

describe Pres do
  
  before :all do
    @browser = IE.new
    add_spec_checker(@browser)    
  end

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

  describe "#length" do
    it "should return the number of pres" do
      @browser.pres.length.should == 7
    end
  end
  
  describe "#[]" do
    it "should return the pre at the given index" do
      @browser.pres[2].id.should == "rspec"
    end
  end

  describe "#each" do
    it "should iterate through pres correctly" do
      @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
      end
    end
  end
  
  after :all do
    @browser.close
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
celerity-0.0.3 spec/pres_spec.rb