Sha256: abc2733510453e4f6e8c7e7616481d7e7983913e8f1966824524fd313ff2ccc4

Contents?: true

Size: 531 Bytes

Versions: 5

Compression:

Stored size: 531 Bytes

Contents

require 'rexml/document'

describe "REXML::Element#instructions" do
  before :each do
    @elem = REXML::Element.new("root")
  end
  it "returns the Instruction children nodes" do
    inst = REXML::Instruction.new("xml-stylesheet", "href='headlines.css'")
    @elem << inst
    @elem.instructions.first.should == inst
  end

  it "returns an empty array if it has no Instruction children" do
    @elem.instructions.should be_empty
  end

  it "freezes the returned array" do
    @elem.instructions.frozen?.should be_true
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubysl-rexml-2.0.4 spec/element/instructions_spec.rb
rubysl-rexml-2.0.3 spec/element/instructions_spec.rb
rubysl-rexml-1.0.0 spec/element/instructions_spec.rb
rubysl-rexml-2.0.2 spec/element/instructions_spec.rb
rubysl-rexml-2.0.1 spec/element/instructions_spec.rb