diff --git a/test/hamlit/rails_template_test.rb b/test/hamlit/rails_template_test.rb
index 3e40d82d..7487670d 100644
--- a/test/hamlit/rails_template_test.rb
+++ b/test/hamlit/rails_template_test.rb
@@ -158,4 +158,18 @@ describe Hamlit::RailsTemplate do
Hamlit::RailsTemplate.set_options(use_html_safe: original)
end
end
+
+ specify 'xml mime_type' do
+ base = ActionView::Base.new(__dir__, {})
+ handler = Hamlit::RailsTemplate.new
+ html_template = ActionView::Template.new('%link', 'test.html.haml', handler, {
+ format: Mime::Type.new('text/html', :html, ['application/xhtml+xml']),
+ })
+ xml_template = ActionView::Template.new('%link', 'test.xml.haml', handler, {
+ format: Mime::Type.new('application/xml', :xml, ['text/xml', 'application/x-xml']),
+ })
+
+ assert_equal %Q|\n|, base.render(template: html_template)
+ assert_equal %Q|\n|, base.render(template: xml_template)
+ end
end