Cleaned up XPath specs using a shared example.
This commit is contained in:
1 parent
0211f60826
commit
580856dcf7
4 files changed
+20
-46
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user