Merge commit 'sr/sinatra' into sr_sinatra

This commit is contained in:
Bryan Helmkamp 2009-03-08 18:54:21 -04:00
commit d1a2c80ab8
2 changed files with 2 additions and 14 deletions

View File

@ -10,16 +10,7 @@ module Webrat
def initialize(context = nil) def initialize(context = nil)
super(context) super(context)
app = app = context.respond_to?(:app) ? context.app : Sinatra::Application
if context.respond_to?(:app)
context.app
else
Sinatra::Application.tap { |app|
app.set :environment, :test
app.disable :run, :reload
}
end
@browser = Sinatra::TestHarness.new(app) @browser = Sinatra::TestHarness.new(app)
end end

View File

@ -3,10 +3,7 @@ require File.dirname(__FILE__) + "/../modular_app"
class MyModularAppTest < Test::Unit::TestCase class MyModularAppTest < Test::Unit::TestCase
def app def app
MyModularApp.tap { |app| MyModularApp
app.disable :run, :reload
app.set :environment, :test
}
end end
def test_it_works def test_it_works