From abc6dd47ede5b96ada1ff8f37dfba73cd5fd586a Mon Sep 17 00:00:00 2001 From: Ben Somers Date: Thu, 17 May 2012 18:46:58 -0700 Subject: Add method_missing to Raindrops::Middleware::Proxy This enables it to behave more like a Rack BodyProxy would, delegating methods to its body object when it does not implement them itself. (Also includes a minor grammar fix to a comment.) [ew: minor comment/whitespace fix] Signed-off-by: Eric Wong --- test/test_middleware.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/test_middleware.rb b/test/test_middleware.rb index eedf04a..56ce346 100644 --- a/test/test_middleware.rb +++ b/test/test_middleware.rb @@ -120,5 +120,9 @@ class TestMiddleware < Test::Unit::TestCase def orig_body.to_path; "/dev/null"; end assert body.respond_to?(:to_path) assert_equal "/dev/null", body.to_path + + def orig_body.body; "this is a body"; end + assert body.respond_to?(:body) + assert_equal "this is a body", body.body end end -- cgit v1.2.3-24-ge0c7