Sha256: a8af0285ab0ef8dbbb668ad1bc1920c7dcd071859c5fca2c9dc9c59995ef5c65
Contents?: true
Size: 704 Bytes
Versions: 11
Compression:
Stored size: 704 Bytes
Contents
require 'helper' class TestAttributeMerger < MiniTest::Unit::TestCase def call(expr) Temple::CoffeeScript::AttributeMerger.new.call(expr) end def test_passes_single_attributes sexp = [:html, :attrs, [:html, :attr, "foo", [:static, "a"]], [:html, :attr, "bar", [:static, "b"]]] assert_equal sexp, call(sexp) end def test_merges_multiple_attributes sexp = [:html, :attrs, [:html, :attr, "class", [:static, "a"]], [:html, :attr, "class", [:static, "b"]]] assert_equal [:html, :attrs, [:html, :attr, "class", [:multi, [:static, "a"], [:static, " "], [:static, "b"]]]], call(sexp) end end
Version data entries
11 entries across 11 versions & 1 rubygems