From 22dec4cbb755f1aaf53d70f86528839e80484de2 Mon Sep 17 00:00:00 2001 From: Slava Yurin Date: Fri, 29 Jun 2012 10:54:17 +0700 Subject: [PATCH] Fix test/rebar_eunit_tests.erl --- test/rebar_eunit_tests.erl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/rebar_eunit_tests.erl b/test/rebar_eunit_tests.erl index 2b9c44e..72fb3ea 100644 --- a/test/rebar_eunit_tests.erl +++ b/test/rebar_eunit_tests.erl @@ -77,18 +77,21 @@ cover_with_suite_test_() -> setup, fun() -> setup_cover_project_with_suite(), - rebar("-v eunit suite=mysuite") + rebar("-v eunit suites=mysuite") end, fun teardown/1, - [{"All cover reports are generated", + [{"Cover reports are generated for module", assert_files_in("the temporary eunit directory", - expected_cover_generated_files())}, + [".eunit/index.html", + ".eunit/mysuite.COVER.html"])}, {"Only production modules get coverage reports", assert_files_not_in("the temporary eunit directory", - [".eunit/myapp_mymod_tests.COVER.html", - ".eunit/mysuite.COVER.html"])}]}. + [".eunit/myapp_app.COVER.html", + ".eunit/myapp_mymod.COVER.html", + ".eunit/myapp_sup.COVER.html", + ".eunit/myapp_mymod_tests.COVER.html"])}]}. expected_cover_generated_files() -> [".eunit/index.html", @@ -247,6 +250,5 @@ assert_full_coverage(Mod) -> Result = [X || X <- string:tokens(binary_to_list(F), "\n"), string:str(X, Mod) =/= 0, string:str(X, "100%") =/= 0], - ok = file:close(F), ?assert(length(Result) =:= 1) end.