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("<marquee>escape me</marquee>")
+ 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
me</b>')
+ end
+ end
end