lib/deas/test_runner.rb in deas-0.13.1 vs lib/deas/test_runner.rb in deas-0.14.0
- old
+ new
@@ -30,24 +30,40 @@
def halt(*args)
throw(:halt, args)
end
- def render(template_name, options = nil, &block)
- RenderArgs.new(template_name, options, block)
- end
-
def redirect(path, *halt_args)
RedirectArgs.new(path, halt_args)
end
- RenderArgs = Struct.new(:template_name, :options, :block)
-
class RedirectArgs < Struct.new(:path, :halt_args)
- def redirect?
- true
- end
+ def redirect?; true; end
end
+
+ def content_type(value, opts={})
+ ContentTypeArgs.new(value, opts)
+ end
+
+ ContentTypeArgs = Struct.new(:value, :opts)
+
+ def status(value)
+ StatusArgs.new(value)
+ end
+
+ StatusArgs = Struct.new(:value)
+
+ def headers(value)
+ HeadersArgs.new(value)
+ end
+
+ HeadersArgs = Struct.new(:value)
+
+ def render(template_name, options = nil, &block)
+ RenderArgs.new(template_name, options, block)
+ end
+
+ RenderArgs = Struct.new(:template_name, :options, :block)
end
end