spec/lis_spec.rb in celerity-0.0.1 vs spec/lis_spec.rb in celerity-0.0.2
- old
+ new
@@ -1,40 +1,40 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
describe "Lis" do
before :all do
- @ie = IE.new
- add_spec_checker(@ie)
+ @browser = IE.new
+ add_spec_checker(@browser)
end
before :each do
- @ie.goto(TEST_HOST + "/non_control_elements.html")
+ @browser.goto(TEST_HOST + "/non_control_elements.html")
end
describe "#length" do
it "should return the number of lis" do
- @ie.lis.length.should == 7
+ @browser.lis.length.should == 7
end
end
describe "#[]" do
it "should return the p at the given index" do
- @ie.lis[5].id.should == "non_link_1"
+ @browser.lis[5].id.should == "non_link_1"
end
end
describe "#each" do
it "should iterate through lis correctly" do
- @ie.lis.each_with_index do |l, index|
- l.name.should == @ie.li(:index, index+1).name
- l.id.should == @ie.li(:index, index+1).id
- l.value.should == @ie.li(:index, index+1).value
+ @browser.lis.each_with_index do |l, index|
+ l.name.should == @browser.li(:index, index+1).name
+ l.id.should == @browser.li(:index, index+1).id
+ l.value.should == @browser.li(:index, index+1).value
end
end
end
after :all do
- @ie.close
+ @browser.close
end
end