diff options
author | Steve Hodgkiss <steve@hodgkiss.me.uk> | 2011-06-18 22:30:01 +0100 |
---|---|---|
committer | Steve Hodgkiss <steve@hodgkiss.me.uk> | 2011-06-18 22:30:01 +0100 |
commit | 50444204cc907e3335d113043acabd439639b9e1 (patch) | |
tree | 5290ffa78e1b5b3d4de9e162687995f4ec92ddf2 /activerecord/test/cases/connection_management_test.rb | |
parent | 2fbb7504e2c2b0a95398d1ef0c97ea4a403d831d (diff) | |
download | rails-50444204cc907e3335d113043acabd439639b9e1.tar.gz rails-50444204cc907e3335d113043acabd439639b9e1.tar.bz2 rails-50444204cc907e3335d113043acabd439639b9e1.zip |
Fix inconsistencies by being polite to the wrapped body. Needed for Rack::Sendfile to function properly. See issue #1761.
Diffstat (limited to 'activerecord/test/cases/connection_management_test.rb')
-rw-r--r-- | activerecord/test/cases/connection_management_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_management_test.rb b/activerecord/test/cases/connection_management_test.rb index 85871aebdf..a1d1177289 100644 --- a/activerecord/test/cases/connection_management_test.rb +++ b/activerecord/test/cases/connection_management_test.rb @@ -77,6 +77,13 @@ module ActiveRecord @management.call(@env) assert ActiveRecord::Base.connection_handler.active_connections? end + + test "proxy is polite to it's body and responds to it" do + body = Class.new(String) { def to_path; "/path"; end }.new + proxy = ConnectionManagement::Proxy.new(body) + assert proxy.respond_to?(:to_path) + assert_equal proxy.to_path, "/path" + end end end end |