Multiple calls to Sass::Engine#render shouldn't accumulate results
Additionally: removed the "@line = nil" from #render_to_tree since it seems better suited inside #split_lines (where it's already present). Signed-off-by: Nathan Weizenbaum <nex342@gmail.com>
This commit is contained in:
parent
f3ac053f9c
commit
51e7035868
|
@ -113,7 +113,7 @@ module Sass
|
|||
end
|
||||
end
|
||||
end
|
||||
@line = nil
|
||||
@lines.clear
|
||||
|
||||
root
|
||||
end
|
||||
|
|
|
@ -52,6 +52,11 @@ class SassEngineTest < Test::Unit::TestCase
|
|||
renders_correctly "basic", { :style => :compact }
|
||||
end
|
||||
|
||||
def test_multiple_calls_to_render
|
||||
sass = Sass::Engine.new("a\n b: c")
|
||||
assert_equal sass.render, sass.render
|
||||
end
|
||||
|
||||
def test_alternate_styles
|
||||
renders_correctly "expanded", { :style => :expanded }
|
||||
renders_correctly "compact", { :style => :compact }
|
||||
|
|
Loading…
Reference in New Issue