Workaround to fix lineno

This commit is contained in:
Takashi Kokubun 2015-10-24 22:23:25 +09:00
parent b5939a3568
commit 3d7470989c
1 changed files with 3 additions and 5 deletions

View File

@ -34,12 +34,10 @@ module RenderAssertion
assert_equal html, render(haml, options)
end
def render(text, options = {}, base = nil, &block)
def render(text, options = {}, &block)
scope = options.delete(:scope) || Object.new
locals = options.delete(:locals) || {}
engine = Hamlit::HamlEngine.new(text, options)
return engine.to_html(base) if base
engine.to_html(scope, locals, &block)
eval Hamlit::HamlEngine.new(text, options).precompiled
end
end