mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Refactor spec helper classes locations and visibility
This commit is contained in:
parent
ad91a22789
commit
5d65bcb3b9
5 changed files with 35 additions and 28 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue