Cleaned up XPath specs using a shared example.

This commit is contained in:
Yorick Peterse committed 2014-07-15 09:34:11 +02:00
1 parent 0211f60826
commit 580856dcf7
4 files changed
+20 -46

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
shared_examples :node_set do |options|
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
example 'return the right amount of rows' do
@set.length.should == options[:length]
end
end