spec/rails/spec/requests/faml_spec.rb in faml-0.2.2 vs spec/rails/spec/requests/faml_spec.rb in faml-0.2.3

- old
+ new

@@ -36,6 +36,20 @@ it 'works with capture method' do get '/books/with_capture' expect(response).to be_ok expect(response.body).to include("<div><div>\n<p>Hello</p>\n</div>\n</div>\n") end + + it 'works with :escaped filter' do + get '/books/escaped' + expect(response).to be_ok + expect(response.body).to include("&lt;marquee&gt;escape me&lt;/marquee&gt;") + end + + describe 'preserve helper' do + it 'returns html_safe string' do + get '/books/preserve' + expect(response).to be_ok + expect(response.body).to include('<b>preserve&#x000A;me</b>') + end + end end