From 9904ef63e083bfe3c1df3e59b60aa6960eede2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 4 Sep 2013 16:55:43 +0200 Subject: add mime! to specs, should override whatever is set by engine --- spec/node_spec.rb | 2 ++ spec/spec_helper.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/spec/node_spec.rb b/spec/node_spec.rb index 120cf88..061c6a5 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -251,8 +251,10 @@ describe Zorglub do it "ext definition and file engine should work" do r = Node0.my_call '/xml_file' r.body[0].should == "file<\/xml>\n" + r.header['Content-type'].should == 'application/xml' r = Node0.my_call '/plain_file' r.body[0].should == "plain file\n" + r.header['Content-type'].should == 'text/plain' end # it "haml engine should work" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3347cf6..5ff5dfb 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -68,11 +68,13 @@ class Node0 < Zorglub::Node no_layout! engine! :file ext! 'xml' + mime! 'application/xml' end def plain_file no_layout! engine! :file ext! 'txt' + mime! 'text/plain' end def engines name no_layout! -- cgit v1.1-2-g2b99