On Thu, 2012-09-06 at 14:21 +0200, [email protected] wrote:
> From: Michal Fojtik <[email protected]>
> 
> 
> Signed-off-by: Michal fojtik <[email protected]>

ACK. One idea:

> diff --git a/server/tests/test_helper.rb b/server/tests/test_helper.rb
> index 57b7fb3..00ebcfa 100644
> --- a/server/tests/test_helper.rb
> +++ b/server/tests/test_helper.rb
> @@ -32,6 +32,16 @@ end
>  
>  include Rack::Test::Methods
>  
> +def run_frontend(frontend=:deltacloud)
> +  Rack::Builder.new {
> +    use Rack::MatrixParams
> +    map Deltacloud[frontend].root_url do
> +      use Rack::MatrixParams
> +      run Deltacloud[frontend].klass
> +    end
> +  }.to_app
> +end

We should pull the code in MatrixParams that handles REQUEST_URI and
REQUEST_PATH specially under env['rack.test'] out of the MatrixParams
middleware and just insert a special TestEnv middleware here that does
the ugly deed.

David


Reply via email to