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,13 +1,13 @@
|
|||
require "./spec_helper"
|
||||
|
||||
class CustomTestHandler < Kemal::Handler
|
||||
private class CustomTestHandler < Kemal::Handler
|
||||
def call(env)
|
||||
env.response << "Kemal"
|
||||
call_next env
|
||||
end
|
||||
end
|
||||
|
||||
class OnlyHandler < Kemal::Handler
|
||||
private class OnlyHandler < Kemal::Handler
|
||||
only ["/only"]
|
||||
|
||||
def call(env)
|
||||
|
@ -17,7 +17,7 @@ class OnlyHandler < Kemal::Handler
|
|||
end
|
||||
end
|
||||
|
||||
class ExcludeHandler < Kemal::Handler
|
||||
private class ExcludeHandler < Kemal::Handler
|
||||
exclude ["/exclude"]
|
||||
|
||||
def call(env)
|
||||
|
@ -27,7 +27,7 @@ class ExcludeHandler < Kemal::Handler
|
|||
end
|
||||
end
|
||||
|
||||
class PostOnlyHandler < Kemal::Handler
|
||||
private class PostOnlyHandler < Kemal::Handler
|
||||
only ["/only", "/route1", "/route2"], "POST"
|
||||
|
||||
def call(env)
|
||||
|
@ -37,7 +37,7 @@ class PostOnlyHandler < Kemal::Handler
|
|||
end
|
||||
end
|
||||
|
||||
class PostExcludeHandler < Kemal::Handler
|
||||
private class PostExcludeHandler < Kemal::Handler
|
||||
exclude ["/exclude"], "POST"
|
||||
|
||||
def call(env)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue