2014-10-05 21:52:12 +00:00
|
|
|
RSpec.shared_examples :node_set do |options|
|
2014-07-15 07:34:11 +00:00
|
|
|
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
|
2014-07-22 19:24:45 +00:00
|
|
|
|
2014-10-05 21:52:12 +00:00
|
|
|
RSpec.shared_examples :empty_node_set do
|
2014-07-22 19:24:45 +00:00
|
|
|
example 'return a NodeSet instance' do
|
|
|
|
@set.is_a?(Oga::XML::NodeSet).should == true
|
|
|
|
end
|
|
|
|
|
|
|
|
example 'return the right amount of rows' do
|
|
|
|
@set.empty?.should == true
|
|
|
|
end
|
|
|
|
end
|