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:
parent
bed93305a4
commit
79e66dfa8e
1 changed files with 9 additions and 4 deletions
|
@ -79,10 +79,15 @@ class FiltersTest < Haml::TestCase
|
|||
end
|
||||
|
||||
test "should pass options to Tilt filters that precompile" do
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue