test/nitro/builders/tc_xhtml.rb in nitro-0.15.0 vs test/nitro/builders/tc_xhtml.rb in nitro-0.16.0
- old
+ new
@@ -2,31 +2,32 @@
require 'test/unit'
require 'nitro/builders/xhtml'
class TC_BuildersXhtml < Test::Unit::TestCase # :nodoc: all
+ include Nitro
def test_options
- x = N::XhtmlString.new
+ x = XhtmlString.new
options = ['Male', 'Female']
x.select(:name => 'sex') do
x.options(options, 1)
end
res = '<select name="sex"><option value="0">Male</option>' +
'<option value="1" selected="1">Female</option></select>'
assert_equal res, x
- x = N::XhtmlString.new
+ x = XhtmlString.new
options = ['Male', 'Female']
x.select('-- Select sex --', :name => 'sex') do
x.options(options, 1)
end
res = '<select name="sex"><option>-- Select sex --</option>' +
'<option value="0">Male</option>' +
'<option value="1" selected="1">Female</option></select>'
assert_equal res, x
- x = N::XhtmlString.new
+ x = XhtmlString.new
options = {'Male' => 'm', 'Female' => 'f'}
x.select(:name => 'sex') do
x.options(options, 'm')
end
res = '<select name="sex"><option value="m" selected="1">Male</option>' +