Sha256: 1547cebbefc96040ab4625a080edb33554ec0431d8689951e11c059008011d41
Contents?: true
Size: 545 Bytes
Versions: 3
Compression:
Stored size: 545 Bytes
Contents
# -*- coding: utf-8 -*- require "test_helper" class ContextTest < Sablon::TestCase def test_converts_symbol_keys_to_string_keys transformed = Sablon::Context.transform({a: 1, b: {c: 2, "d" => 3}}) assert_equal({"a"=>1, "b"=>{"c" =>2, "d"=>3}}, transformed) end def test_recognizes_wordml_keys transformed = Sablon::Context.transform({"word_ml:mykey" => "<w:p><w:p>", "otherkey" => "<nope>"}) assert_equal({ "mykey"=>Sablon.content(:word_ml, "<w:p><w:p>"), "otherkey"=>"<nope>"}, transformed) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sablon-0.0.12 | test/context_test.rb |
sablon-0.0.11 | test/context_test.rb |
sablon-0.0.10 | test/context_test.rb |