From: Alexis Laferrière Date: Wed, 6 Jan 2016 18:56:49 +0000 (-0500) Subject: lib/nitcorn: update examples as they don't need to check for tests X-Git-Tag: v0.8~17^2 X-Git-Url: http://nitlanguage.org lib/nitcorn: update examples as they don't need to check for tests Signed-off-by: Alexis Laferrière --- diff --git a/lib/nitcorn/examples/src/nitcorn_hello_world.nit b/lib/nitcorn/examples/src/nitcorn_hello_world.nit index a9e8f55..9eb1662 100644 --- a/lib/nitcorn/examples/src/nitcorn_hello_world.nit +++ b/lib/nitcorn/examples/src/nitcorn_hello_world.nit @@ -77,9 +77,6 @@ vh.routes.add new Route("/hello/:name", new ParamAction) # Serve everything else with a standard `FileServer` with a root at "www/hello_world/" vh.routes.add new Route(null, new FileServer("www/hello_world/")) -# Avoid executing when running tests -if "NIT_TESTING".environ == "true" then exit 0 - var factory = new HttpFactory.and_libevent factory.config.virtual_hosts.add vh factory.run diff --git a/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit b/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit index f154dab..13d9c81 100644 --- a/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit +++ b/lib/nitcorn/examples/src/nitcorn_reverse_proxy.nit @@ -18,9 +18,6 @@ import nitcorn -# Avoid executing when running tests -if "NIT_TESTING".environ == "true" then exit 0 - # Create the virtualhost for your nitcorn server var vh = new VirtualHost("localhost:8080") diff --git a/lib/nitcorn/examples/src/restful_annot.nit b/lib/nitcorn/examples/src/restful_annot.nit index 3657031..60cf488 100644 --- a/lib/nitcorn/examples/src/restful_annot.nit +++ b/lib/nitcorn/examples/src/restful_annot.nit @@ -39,9 +39,6 @@ var vh = new VirtualHost("localhost:8080") # Serve everything with our restful action vh.routes.add new Route(null, new MyAction) -# Avoid executing when running tests -if "NIT_TESTING".environ == "true" then exit 0 - var factory = new HttpFactory.and_libevent factory.config.virtual_hosts.add vh factory.run