#164 ✓resolved
Andreas Haller

Make it work with Sinatra::Base-apps

Reported by Andreas Haller | February 15th, 2009 @ 04:30 AM

Since Sinatra 0.9.0, there is this new feature where you can build multiple apps, that run in isolation and can co-exist with other Rack apps (http://www.sinatrarb.com/2009/01/18/sinatra-0.9.0.html)

You do this, by inheriting from Sinatra::Base. Like
class MyApp < Sinatra::Base

To run/test this app, you have to tell Sinatra::Test to run against your MyApp class, instead of Sinatra::Application.

Here's one convenient solution for this:
Webrat.configuration.application = MyApp

I've implemented this and wrote/copied a spec over here:

Bye, Andreas

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket