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

Version Path
skim-0.9.3 test/test_attribute_merger.rb
skim-0.9.2 test/test_attribute_merger.rb
skim-0.9.1 test/test_attribute_merger.rb
skim-0.9.0 test/test_attribute_merger.rb
skim-0.8.6 test/test_attribute_merger.rb
skim-0.8.5 test/test_attribute_merger.rb
skim-0.8.4 test/test_attribute_merger.rb
skim-0.8.3 test/test_attribute_merger.rb
skim-0.8.2 test/test_attribute_merger.rb
skim-0.8.1 test/test_attribute_merger.rb
skim-0.8.0 test/test_attribute_merger.rb