Sha256: a5d5b534928b7b023f4a575eb27bfabff17ca6080d07b72e6b321b9ffe300def
Contents?: true
Size: 758 Bytes
Versions: 20
Compression:
Stored size: 758 Bytes
Contents
require 'test_helper' module HandlebarsAssets class SlimbarsTest < ::Minitest::Test include SprocketsScope include CompilerSupport def compile_slim(source) Slim::Template.new(HandlebarsAssets::Config.slim_options) { source }.render end def teardown HandlebarsAssets::Config.reset! HandlebarsAssets::Handlebars.reset! end def test_render_slim root = '/myapp/app/assets/templates' file = 'test_render.slimbars' scope = make_scope root, file source = "p This is {{handlebars}}" template = HandlebarsAssets::HandlebarsTemplate.new(scope.pathname.to_s) { source } assert_equal hbs_compiled('test_render', compile_slim(source)), template.render(scope, {}) end end end
Version data entries
20 entries across 20 versions & 3 rubygems