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:
parent
7996b1131e
commit
d9c75bc976
1 changed files with 5 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue