spec/watirspec/strongs_spec.rb in watir-webdriver-0.0.6 vs spec/watirspec/strongs_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 "Strongs" do
before :each do
browser.goto(WatirSpec.files + "/non_control_elements.html")
@@ -19,14 +19,20 @@
end
end
describe "#each" do
it "iterates through divs correctly" do
+ count = 0
+
browser.strongs.each_with_index do |s, index|
strong = browser.strong(:index, index)
s.id.should == strong.id
s.class_name.should == strong.class_name
+
+ count += 1
end
+
+ count.should > 0
end
end
end