Sha256: 1e60f27aaa26258b2e0055dfeefc437ef54bc030062f96cd751e24e4bd49d41c

Contents?: true

Size: 824 Bytes

Versions: 1

Compression:

Stored size: 824 Bytes

Contents

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

describe "Maps" do

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

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

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

  describe "#[]" do
    it "returns the p at the given index" do
      @browser.maps[1].id.should == "triangle_map"
    end
  end

  describe "#each" do
    it "iterates through maps correctly" do
      @browser.maps.each_with_index do |m, index|
        m.name.should == @browser.map(:index, index+1).name
        m.id.should == @browser.map(:index, index+1).id
        m.value.should == @browser.map(: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/maps_spec.rb