test/unit/sinatra_app_tests.rb in deas-0.18.0 vs test/unit/sinatra_app_tests.rb in deas-0.19.0
- old
+ new
@@ -11,19 +11,22 @@
class BaseTests < Assert::Context
desc "Deas::SinatraApp"
setup do
proxy = Deas::RouteProxy.new('TestViewHandler')
@route = Deas::Route.new(:get, '/something', proxy)
+ @router = Deas::Router.new
+ @router.routes = [ @route ]
+
@configuration = Deas::Server::Configuration.new.tap do |c|
c.env = 'staging'
c.root = 'path/to/somewhere'
c.dump_errors = true
c.method_override = false
c.sessions = false
c.show_exceptions = true
c.static = true
c.reload_templates = true
- c.routes = [ @route ]
+ c.router = @router
end
@sinatra_app = Deas::SinatraApp.new(@configuration)
end
subject{ @sinatra_app }