Change port and move to constants

This commit is contained in:
Sdogruyol 2016-04-10 14:24:19 +03:00
parent b4d7512ca5
commit 85b52dab77
1 changed files with 8 additions and 4 deletions

View File

@ -1,19 +1,23 @@
require "spec" require "spec"
require "kemal" 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 Spec.before_each do
spawn do spawn do
Kemal.run Kemal.run
Kemal.config.server.listen Kemal.config.server.listen
end end
sleep 0.00001 sleep TIME_TO_SLEEP
end end
Spec.after_each do Spec.after_each do
spawn do spawn do
Kemal.run Kemal.config.server.close
Kemal.config.server.listen
end end
end end