Browse files

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

  • Loading branch information...
1 parent 7996b11 commit d9c75bc97646227b85abfcc51ad404f6d3f797f8 @rtomayko rtomayko committed Jan 15, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/sinatra/test.rb
View
5 lib/sinatra/test.rb
@@ -60,6 +60,11 @@ def method_missing(name, *args, &block)
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",

0 comments on commit d9c75bc

Please sign in to comment.