Sha256: ebc1e79451c07a1ebb07895cb7114a139240dbebf88d3fdd2cf03e86c8757293
Contents?: true
Size: 648 Bytes
Versions: 6
Compression:
Stored size: 648 Bytes
Contents
require 'test_helper' class NullWrapTest < ActiveSupport::TestCase ETC = ExpressTemplates::Components test "a NullWrap is a Container" do assert ETC::NullWrap.ancestors.include?(ETC::Capabilities::Parenting) end test "null_wrap accepts a string contianing a ruby string def" do compiled_src = ETC::NullWrap.new("%q(<p>whatever<p>)").compile assert_equal '<p>whatever<p>', eval(compiled_src) end test "null_wrap wraps template code" do fragment = -> { null_wrap { p { "whatever" } } } assert_equal '<p>whatever</p>', eval(ExpressTemplates.compile(&fragment)) end end
Version data entries
6 entries across 6 versions & 2 rubygems