Sha256: 7542c6b5c21cf61033cf5b05d5ae68ff30edd31354a7f5c4d7756182c5c058bc
Contents?: true
Size: 419 Bytes
Versions: 5
Compression:
Stored size: 419 Bytes
Contents
require 'rexml/document' describe "REXML::Attributes#[]" do before :each do @e = REXML::Element.new("root") @lang = REXML::Attribute.new("language", "english") @e.attributes << @lang end it "returns the value of an attribute" do @e.attributes["language"].should == "english" end it "returns nil if the attribute does not exist" do @e.attributes["chunky bacon"].should == nil end end
Version data entries
5 entries across 5 versions & 1 rubygems