test/support/view_handlers.rb in deas-0.13.1 vs test/support/view_handlers.rb in deas-0.14.0
- old
+ new
@@ -59,5 +59,34 @@
halt_args = [ params['code'], params['headers'], params['body'] ].compact
halt(*halt_args)
end
end
+
+class ContentTypeViewHandler
+ include Deas::ViewHandler
+
+ def run!
+ content_type 'text/plain', :charset => 'latin1'
+ end
+
+end
+
+class StatusViewHandler
+ include Deas::ViewHandler
+
+ def run!
+ status 422
+ end
+
+end
+
+class HeadersViewHandler
+ include Deas::ViewHandler
+
+ def run!
+ headers \
+ 'other' => "other",
+ 'a-header' => 'some value'
+ end
+
+end