spec/hiddens_spec.rb in celerity-0.0.1 vs spec/hiddens_spec.rb in celerity-0.0.2
- old
+ new
@@ -1,40 +1,40 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
describe "Hiddens" 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 + "/forms_with_input_elements.html")
+ @browser.goto(TEST_HOST + "/forms_with_input_elements.html")
end
describe "#length" do
it "should return the number of hiddens" do
- @ie.hiddens.length.should == 1
+ @browser.hiddens.length.should == 1
end
end
describe "#[]" do
it "should return the Hidden at the given index" do
- @ie.hiddens[1].id.should == "new_user_interests_dolls"
+ @browser.hiddens[1].id.should == "new_user_interests_dolls"
end
end
describe "#each" do
it "should iterate through hiddens correctly" do
- @ie.hiddens.each_with_index do |h, index|
- h.name.should == @ie.hidden(:index, index+1).name
- h.id.should == @ie.hidden(:index, index+1).id
- h.value.should == @ie.hidden(:index, index+1).value
+ @browser.hiddens.each_with_index do |h, index|
+ h.name.should == @browser.hidden(:index, index+1).name
+ h.id.should == @browser.hidden(:index, index+1).id
+ h.value.should == @browser.hidden(:index, index+1).value
end
end
end
after :all do
- @ie.close
+ @browser.close
end
end