require 'spec_helper' describe Symbiont::WebObjects::Heading do describe "implementation" do let(:heading_object) { Symbiont::WebObjects::Heading } it "should allow locators to be used" do [:class, :id, :index, :xpath, :name].each do |t| locator = heading_object.provide_locator_for t => 'value' locator.keys.first.should == t end end it "should register with an h1 tag" do ::Symbiont::WebObjects.get_class_for(:h1).should == ::Symbiont::WebObjects::Heading end it "should register with an h2 tag" do ::Symbiont::WebObjects.get_class_for(:h2).should == ::Symbiont::WebObjects::Heading end end end