1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

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

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",