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,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)