Sha256: 5f6cf70d9cd55cc33c90ab4cea3c7175a3b6a0f8f6f5bf1a959d7bbf307146b1
Contents?: true
Size: 981 Bytes
Versions: 2
Compression:
Stored size: 981 Bytes
Contents
require 'deas/view_handler' class TestViewHandler include Deas::ViewHandler end class FlagViewHandler include Deas::ViewHandler before{ @before_hook_called = true } after{ @after_hook_called = true } layout 'web' attr_reader :before_init_called, :init_bang_called, :after_init_called, :before_run_called, :run_bang_called, :after_run_called, :before_hook_called, :after_hook_called, :second_before_init_called before_init do @before_init_called = true end before_init do @second_before_init_called = true end def init! @init_bang_called = true end after_init do @after_init_called = true end before_run do @before_run_called = true end def run! @run_bang_called = true end after_run do @after_run_called = true end end class HaltViewHandler include Deas::ViewHandler def run! halt_args = [ params['code'], params['headers'], params['body'] ].compact halt(*halt_args) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
deas-0.4.0 | test/support/view_handlers.rb |
deas-0.3.0 | test/support/view_handlers.rb |