Sha256: e739642639ee0e45255ea438cc86f4f873b1fce723a6c368dd8f49cb80e4df57

Contents?: true

Size: 766 Bytes

Versions: 1

Compression:

Stored size: 766 Bytes

Contents

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

describe "Metas" do

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

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

  describe "#length" do
    it "returns the number of meta elements" do
      @browser.metas.length.should == 2
    end
  end

  describe "#[]" do
    it "returns the meta element at the given index" do
      @browser.metas[2].name.should == "description"
    end
  end

  describe "#each" do
    it "iterates through meta elements correctly" do
      @browser.metas.each_with_index do |m, index|
        m.content.should == @browser.meta(:index, index+1).content
      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/metas_spec.rb