test/nitro/builders/tc_xml.rb in nitro-0.15.0 vs test/nitro/builders/tc_xml.rb in nitro-0.16.0
- old
+ new
@@ -2,18 +2,18 @@
require 'test/unit'
require 'nitro/builders/xml'
class TC_BuildersXml < Test::Unit::TestCase # :nodoc: all
- include N
+ include Nitro
def test_string
x = XmlString.new
- x.start_tag('html').
- start_tag('title').text('hello').end_tag('title').
- end_tag('html')
+ x.start_tag!('html').
+ start_tag!('title').text!('hello').end_tag!('title').
+ end_tag!('html')
assert_equal '<html><title>hello</title></html>', x
end
def test_missing
@@ -44,12 +44,12 @@
def test_xml_builder
buffer = ''
x = XmlBuilder.new(buffer)
- x.start_tag('html').
- start_tag('title').text('hello').end_tag('title').
- end_tag('html')
+ x.start_tag!('html').
+ start_tag!('title').text!('hello').end_tag!('title').
+ end_tag!('html')
assert_equal '<html><title>hello</title></html>', buffer
end
end