Sha256: 3daf95e9e4037322aa3236550b9b98e7e642110336dbc14e7cab479fccc9d299
Contents?: true
Size: 542 Bytes
Versions: 4
Compression:
Stored size: 542 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').should == 'foo' status('/foo').should == 404 end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
roda-2.2.0 | spec/plugin/delegate_spec.rb |
roda-2.1.0 | spec/plugin/delegate_spec.rb |
roda-2.0.0 | spec/plugin/delegate_spec.rb |
roda-1.3.0 | spec/plugin/delegate_spec.rb |