Sha256: 20386e9dc6a929dd1f3ad1a0f2ff1904dfc9e6493b681311c913f28bba3ea2cc
Contents?: true
Size: 694 Bytes
Versions: 17
Compression:
Stored size: 694 Bytes
Contents
require File.expand_path("spec_helper", File.dirname(__FILE__)) describe "Roda.request_module and .response_module" do it "should include given module in request or response class" do app(:bare) do request_module(Module.new{def h; halt response.finish end}) response_module(Module.new{def finish; [1, {}, []] end}) route do |r| r.h end end req.should == [1, {}, []] end it "should accept blocks and turn them into modules" do app(:bare) do request_module{def h; halt response.finish end} response_module{def finish; [1, {}, []] end} route do |r| r.h end end req.should == [1, {}, []] end end
Version data entries
17 entries across 17 versions & 2 rubygems