spec/page_spec.rb in taza-0.8.5 vs spec/page_spec.rb in taza-0.8.6

- old
+ new

@@ -91,6 +91,15 @@ it "should not call element block if filters fail" do page = FilterAnElement.new lambda { page.false_item }.should raise_error page.called_element_method.should_not be_true end + + it "should not allow more than one element descriptor with the same element name" do + lambda{ + class DuplicateElements < Taza::Page + element(:foo) { true } + element(:foo) { false } + end + }.should raise_error(Taza::ElementError) + end end