Change port and move to constants
This commit is contained in:
parent
b4d7512ca5
commit
85b52dab77
1 changed files with 8 additions and 4 deletions
|
@ -1,19 +1,23 @@
|
|||
require "spec"
|
||||
require "kemal"
|
||||
|
||||
Kemal.config.env = "test"
|
||||
TIME_TO_SLEEP = 0.00001
|
||||
APP_PORT = 1989
|
||||
APP_ENV = "test"
|
||||
|
||||
Kemal.config.env = APP_ENV
|
||||
Kemal.config.port = APP_PORT
|
||||
|
||||
Spec.before_each do
|
||||
spawn do
|
||||
Kemal.run
|
||||
Kemal.config.server.listen
|
||||
end
|
||||
sleep 0.00001
|
||||
sleep TIME_TO_SLEEP
|
||||
end
|
||||
|
||||
Spec.after_each do
|
||||
spawn do
|
||||
Kemal.run
|
||||
Kemal.config.server.listen
|
||||
Kemal.config.server.close
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue