diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2024-08-12 13:39:18 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2024-08-12 13:39:18 +0200 |
commit | c9cceed1b488a2519a827d406d0408dbbdebbc82 (patch) | |
tree | 80d42cea53c0fbccf71f8b48ad3295aac4d132fe /spec | |
parent | bc1d6ba68b2ef61ff24b48a27cd0ce412d363d49 (diff) | |
download | zorglub-c9cceed1b488a2519a827d406d0408dbbdebbc82.zip zorglub-c9cceed1b488a2519a827d406d0408dbbdebbc82.tar.gz |
fix haml engine caching and escaping
Diffstat (limited to 'spec')
-rw-r--r-- | spec/data/view/node0/engines.haml | 2 | ||||
-rw-r--r-- | spec/node_spec.rb | 4 | ||||
-rw-r--r-- | spec/spec_helper.rb | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/spec/data/view/node0/engines.haml b/spec/data/view/node0/engines.haml index b9ea984..d35145e 100644 --- a/spec/data/view/node0/engines.haml +++ b/spec/data/view/node0/engines.haml @@ -1 +1 @@ -%h1="Hello world" +%h1="Hello #{@name}" diff --git a/spec/node_spec.rb b/spec/node_spec.rb index fe1edfb..785da42 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -266,10 +266,10 @@ describe Zorglub do it 'haml engine should work' do Node0.app.opt! :engines_cache_enabled, false r = Node0.my_call '/engines/haml' - expect(r.body[0]).to eq "<h1>Hello world</h1>\n" + expect(r.body[0]).to eq "<h1>Hello <i>world</i></h1>\n" Node0.app.opt! :engines_cache_enabled, true r = Node0.my_call '/engines/haml' - expect(r.body[0]).to eq "<h1>Hello world</h1>\n" + expect(r.body[0]).to eq "<h1>Hello <i>world</i></h1>\n" end it 'sass engine should work' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 257327e..079607b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -112,6 +112,7 @@ class Node0 < Zorglub::Node no_layout! case name when 'haml' + @name = '<i>world</i>' engine! :haml when 'sass' engine! :sass |