Sha256: 46c5eeb012b2a0a0d5d5116db591f40e7bc0d96e6b02735c37c11ddcc3396404
Contents?: true
Size: 544 Bytes
Versions: 28
Compression:
Stored size: 544 Bytes
Contents
require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__))) describe "delegate plugin" do it "adds request_delegate and response_delegate class methods for delegating" do app(:bare) do plugin :delegate request_delegate :root response_delegate :headers def self.a; 'foo'; end class_delegate :a route do root do headers['Content-Type'] = a end end end header('Content-Type').must_equal 'foo' status('/foo').must_equal 404 end end
Version data entries
28 entries across 28 versions & 1 rubygems