Sha256: bb719362ebbe638237550a067d15e2753cc3c89c378a0e70104f256393c0e222

Contents?: true

Size: 506 Bytes

Versions: 5

Compression:

Stored size: 506 Bytes

Contents

require 'rexml/document'

describe "REXML::Node#next_sibling_node" do
  before :each do
    @e = REXML::Element.new("root")
    @node1 = REXML::Element.new("node")
    @node2 = REXML::Element.new("another node")
    @e << @node1
    @e << @node2
  end

  it "returns the next child node in parent" do
    @node1.next_sibling_node.should == @node2
  end

  it "returns nil if there are no more child nodes next" do
    @node2.next_sibling_node.should == nil
    @e.next_sibling_node.should == nil
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubysl-rexml-2.0.4 spec/node/next_sibling_node_spec.rb
rubysl-rexml-2.0.3 spec/node/next_sibling_node_spec.rb
rubysl-rexml-1.0.0 spec/node/next_sibling_node_spec.rb
rubysl-rexml-2.0.2 spec/node/next_sibling_node_spec.rb
rubysl-rexml-2.0.1 spec/node/next_sibling_node_spec.rb