Skip to content
Browse files

add an index.html and a failing test to start

  • Loading branch information...
1 parent 5776ca4 commit a2eb8193b12661f0ab97c9a106c77d4985b31abe @etrepum etrepum committed Nov 12, 2010
View
1 support/templates/mochiwebapp.template
@@ -13,6 +13,7 @@
{template, "mochiwebapp_skel/src/mochiapp_sup.erl", "{{dest}}/src/{{appid}}_sup.erl"}.
{template, "mochiwebapp_skel/src/mochiapp_web.erl", "{{dest}}/src/{{appid}}_web.erl"}.
{template, "mochiwebapp_skel/start-dev.sh", "{{dest}}/start-dev.sh"}.
+{template, "mochiwebapp_skel/priv/www/index.html", "{{dest}}/priv/www/index.html"}.
{file, "../../.gitignore", "{{dest}}/.gitignore"}.
{file, "../../Makefile", "{{dest}}/Makefile"}.
{file, "mochiwebapp_skel/rebar.config", "{{dest}}/rebar.config"}.
View
8 support/templates/mochiwebapp_skel/priv/www/index.html
@@ -0,0 +1,8 @@
+<html>
+<head>
+<title>It Worked</title>
+</head>
+<body>
+{{appid}} running.
+</body>
+</html>
View
14 support/templates/mochiwebapp_skel/src/mochiapp_web.erl
@@ -53,3 +53,17 @@ loop(Req, DocRoot) ->
get_option(Option, Options) ->
{proplists:get_value(Option, Options), proplists:delete(Option, Options)}.
+
+%%
+%% Tests
+%%
+-ifdef(TEST).
+-include_lib("eunit/include/eunit.hrl").
+
+you_should_write_a_test() ->
+ ?assertEqual(
+ "No, but I will!",
+ "Have you written any tests?"),
+ ok.
+
+-endif.

0 comments on commit a2eb819

Please sign in to comment.
Something went wrong with that request. Please try again.