Merge commit 'sr/sinatra' into sr_sinatra
This commit is contained in:
commit
d1a2c80ab8
@ -10,16 +10,7 @@ module Webrat
|
||||
def initialize(context = nil)
|
||||
super(context)
|
||||
|
||||
app =
|
||||
if context.respond_to?(:app)
|
||||
context.app
|
||||
else
|
||||
Sinatra::Application.tap { |app|
|
||||
app.set :environment, :test
|
||||
app.disable :run, :reload
|
||||
}
|
||||
end
|
||||
|
||||
app = context.respond_to?(:app) ? context.app : Sinatra::Application
|
||||
@browser = Sinatra::TestHarness.new(app)
|
||||
end
|
||||
|
||||
|
@ -3,10 +3,7 @@ require File.dirname(__FILE__) + "/../modular_app"
|
||||
|
||||
class MyModularAppTest < Test::Unit::TestCase
|
||||
def app
|
||||
MyModularApp.tap { |app|
|
||||
app.disable :run, :reload
|
||||
app.set :environment, :test
|
||||
}
|
||||
MyModularApp
|
||||
end
|
||||
|
||||
def test_it_works
|
||||
|
Loading…
Reference in New Issue
Block a user