Sha256: 94604b7483a67379e3cf91eacfac323ae81a0de6048ae1f937b5b72f74ffa7e7
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/more/xmlbuilder.rb # # Extracted Fri Feb 16 02:00:36 EST 2007 # Project.rb Test Extraction # require 'facets/more/xmlbuilder.rb' require 'test/unit' class TCXMLBuilder < Test::Unit::TestCase def test_01 x = XMLBuilder.new doc = x.html { head { title "Test" } body { p "Hello" text "Test" } } r = "<html><head><title>Test</title></head><body><p>Hello</p>Test</body></html>" assert_equal( r, doc ) assert_equal( r, x.to_s ) end #def tes_explicit # x = XMLBuilder.new(true) # doc = x.html { # x.head { # x.title "Test" # } # x.body { # x.p "Hello" # x << text("Test") # } # } # r = "<html><head><title>Test</title></head><body><p>Hello</p>Test</body></html>" # assert_equal( r, doc ) # assert_equal( r, x.to_s ) #end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/more/test_xmlbuilder.rb |