#= require ultimate/underscore/underscore
#= require ultimate/underscore/underscore.string
#= require ultimate/helpers/tag
module "Ultimate.Helpers.Tag"
_.extend @, Ultimate.Helpers.Tag
test "tag_options", ->
strictEqual tag_options(), ""
strictEqual tag_options({}), ""
ok /title="Some title"/.test tag_options(class: "some-class", title: "Some title")
equal tag_options(class: ["song", "play>"]), ' class="song play>"'
equal tag_options(disabled: true, itemscope: false, multiple: true, readonly: true), ' disabled="disabled" multiple="multiple" readonly="readonly"'
equal tag_options(data: {remote: true}, role: "ajax"), ' data-remote="true" role="ajax"'
equal tag_options(data: {inner: {section: true}}), ' data-inner="{"section":true}"'
equal tag_options(data: {inner: {section: true}}, false), ' data-inner="{"section":true}"'
equal tag_options(included: ''), ' included=""'
test "tag", ->
equal tag('br'), '
'
equal tag('br', null, true), '
'
equal tag('input', type: 'text', disabled: true), ''
equal tag('img', src: 'open & shut.png'), ''
equal tag("img", {src: "open & shut.png"}, false, false), ''
equal tag("div", data: {name: 'Stephen', city_state: ['Chicago', 'IL']}), '