test/test_helper.rb in hogan_assets-1.5.1 vs test/test_helper.rb in hogan_assets-1.6.0

- old
+ new

@@ -9,10 +9,19 @@ end end end + module TestSupport + def compiled_template(text) + HoganAssets::Hogan.compile(text) + end + + def haml_compiled(scope, text) + Haml::Engine.new(text, HoganAssets::Config.haml_options.merge(@options)).render(scope, {}) + end + # Try to act like sprockets. def make_scope(root, file) Class.new do define_method(:logical_path) { pathname.to_s.gsub(root + '/', '').gsub(/\..*/, '') }