$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', 'lib') require 'test/unit' require 'nitro/builders/xhtml' class TC_BuildersXhtml < Test::Unit::TestCase # :nodoc: all include Nitro def test_options x = XhtmlString.new options = ['Male', 'Female'] x.select(:name => 'sex') do x.options(options, 1) end res = '' assert_equal res, x x = XhtmlString.new options = ['Male', 'Female'] x.select('-- Select sex --', :name => 'sex') do x.options(options, 1) end res = '' assert_equal res, x x = XhtmlString.new options = {'Male' => 'm', 'Female' => 'f'} x.select(:name => 'sex') do x.options(options, 'm') end res = '' assert_equal res, x end end