Refactor spec helper classes locations and visibility

This commit is contained in:
Johannes Müller 2017-07-20 15:23:32 +02:00 committed by sdogruyol
parent ad91a22789
commit 5d65bcb3b9
5 changed files with 35 additions and 28 deletions

View file

@ -1,6 +1,23 @@
require "spec"
require "../src/kemal"
class TestContextStorageType
property id
@id = 1
def to_s
@id
end
end
class AnotherContextStorageType
property name
@name = "kemal-context"
end
Kemal::Macros.add_context_storage_type(TestContextStorageType)
Kemal::Macros.add_context_storage_type(AnotherContextStorageType)
def call_request_on_app(app, request)
io = IO::Memory.new
response = HTTP::Server::Response.new(io)