summaryrefslogtreecommitdiff
blob: 9c3ccc0cf912be98f86fb4130e6a763824f8c305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
commit f00c791c8baa150bea4de7a4efbe941b93470c02
Author: Sam Soffes <sam@samsoff.es>
Date:   Fri Sep 14 11:55:10 2012 -0700

    Support Sinatra::ExtendedRack. Fixes #30

diff --git a/lib/sinatra/async/test.rb b/lib/sinatra/async/test.rb
index 1571dbe..7e98aca 100644
--- a/lib/sinatra/async/test.rb
+++ b/lib/sinatra/async/test.rb
@@ -87,6 +87,8 @@ class Sinatra::Async::Test
       # This hack exists because sinatra is now returning a proper rack stack.
       # We might need to consider alternative approaches in future.
       app = app()
+      app = app.app if app.is_a?(Sinatra::ExtendedRack)
+
       until app.nil? || app.is_a?(Sinatra::Base)
         app = app.instance_variable_get(:@app)
       end