spec/watirspec/checkboxes_spec.rb in watir-webdriver-0.0.6 vs spec/watirspec/checkboxes_spec.rb in watir-webdriver-0.0.7
- old
+ new
@@ -1,7 +1,7 @@
# encoding: utf-8
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path('spec_helper', File.dirname(__FILE__))
describe "CheckBoxes" do
before :each do
browser.goto(WatirSpec.files + "/forms_with_input_elements.html")
@@ -19,14 +19,20 @@
end
end
describe "#each" do
it "iterates through checkboxes correctly" do
+ count = 0
+
browser.checkboxes.each_with_index do |c, index|
c.name.should == browser.checkbox(:index, index).name
c.id.should == browser.checkbox(:index, index).id
c.value.should == browser.checkbox(:index, index).value
+
+ count += 1
end
+
+ count.should > 0
end
end
end