spec/page-object/elements/area_spec.rb in page-object-1.0.2 vs spec/page-object/elements/area_spec.rb in page-object-1.0.3
- old
+ new
@@ -6,18 +6,18 @@
context "when mapping how to find an element" do
it "should map watir types to same" do
[:class, :id, :index, :name, :xpath].each do |t|
identifier = area.watir_identifier_for t => 'value'
- identifier.keys.first.should == t
+ expect(identifier.keys.first).to eql t
end
end
it "should map selenium types to same" do
[:class, :id, :index, :name, :xpath].each do |t|
key, value = area.selenium_identifier_for t => 'value'
- key.should == t
+ expect(key).to eql t
end
end
end
context "implementation" do
@@ -25,21 +25,21 @@
context "when using selenium" do
let(:selenium_area) { PageObject::Elements::Area.new(area_element, :platform => :selenium_webdriver) }
it "should know its coords" do
- area_element.should_receive(:attribute).with(:coords).and_return("1,2,3,4")
- selenium_area.coords.should == "1,2,3,4"
+ expect(area_element).to receive(:attribute).with(:coords).and_return("1,2,3,4")
+ expect(selenium_area.coords).to eql "1,2,3,4"
end
it "should know its shape" do
- area_element.should_receive(:attribute).with(:shape).and_return('circle')
- selenium_area.shape.should == 'circle'
+ expect(area_element).to receive(:attribute).with(:shape).and_return('circle')
+ expect(selenium_area.shape).to eql 'circle'
end
it "should know its href" do
- area_element.should_receive(:attribute).with(:href).and_return('twitter.com')
- selenium_area.href.should == 'twitter.com'
+ expect(area_element).to receive(:attribute).with(:href).and_return('twitter.com')
+ expect(selenium_area.href).to eql 'twitter.com'
end
end
end
end