Sha256: 2b0369e37c882d2f739f79152bd7a64665ce5f24411a87c6a7d7b411d62f1cf0
Contents?: true
Size: 862 Bytes
Versions: 20
Compression:
Stored size: 862 Bytes
Contents
require 'test_helper' module HandlebarsAssets class CompilingTest < ::MiniTest::Test def teardown HandlebarsAssets::Config.reset! HandlebarsAssets::Handlebars.reset! end def test_custom_handlebars source = "This is {{handlebars}}" HandlebarsAssets::Config.compiler_path = File.expand_path '../../edge', __FILE__ compiled = Handlebars.precompile(source, HandlebarsAssets::Config.options) assert_match /PRECOMPILE CALLED/, compiled end def test_patching_handlebars source = "This is {{nested.handlebars}}" HandlebarsAssets::Config.patch_path = File.expand_path '../../patch', __FILE__ HandlebarsAssets::Config.patch_files = ['patch.js'] compiled = Handlebars.precompile(source, HandlebarsAssets::Config.options) assert_match /CALLED PATCH/, compiled end end end
Version data entries
20 entries across 20 versions & 3 rubygems