1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Replace original ERB filter options after test

This is just a precaution, it isn't causing any issues at the moment.
This commit is contained in:
Matt Wildig 2014-11-29 01:49:32 +00:00
parent bed93305a4
commit 79e66dfa8e

View file

@ -79,10 +79,15 @@ class FiltersTest < Haml::TestCase
end
test "should pass options to Tilt filters that precompile" do
haml = ":erb\n <%= 'foo' %>"
refute_match('test_var', Haml::Engine.new(haml).compiler.precompiled)
Haml::Filters::Erb.options = {:outvar => 'test_var'}
assert_match('test_var', Haml::Engine.new(haml).compiler.precompiled)
begin
orig_erb_opts = Haml::Filters::Erb.options
haml = ":erb\n <%= 'foo' %>"
refute_match('test_var', Haml::Engine.new(haml).compiler.precompiled)
Haml::Filters::Erb.options = {:outvar => 'test_var'}
assert_match('test_var', Haml::Engine.new(haml).compiler.precompiled)
ensure
Haml::Filters::Erb.options = orig_erb_opts
end
end
test "should pass options to Tilt filters that don't precompile" do