Implement Sinatra::Test#respond_to? since we override method_missing

This commit is contained in:
Ryan Tomayko 2009-01-14 18:50:49 -08:00
parent 7996b1131e
commit d9c75bc976
1 changed files with 5 additions and 0 deletions

View File

@ -60,6 +60,11 @@ module Sinatra
end
end
# Also check @response since we delegate there.
def respond_to?(symbol, include_private=false)
super || (@response && @response.respond_to?(symbol, include_private))
end
RACK_OPT_NAMES = {
:accept => "HTTP_ACCEPT",
:agent => "HTTP_USER_AGENT",