Change port and move to constants

This commit is contained in:
Sdogruyol 2016-04-10 14:24:19 +03:00
parent b4d7512ca5
commit 85b52dab77

View file

@ -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